this post was submitted on 10 Jul 2023
-1 points (0.0% liked)

Programmer Humor

32461 readers
453 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
error[E0277]: the trait bound `{integer}: Buy` is not satisfied
  --> src/main.rs:4:13
   |
2  |     buy(milk);
3  |     if they_have_eggs {
4  |         buy(6);
   |        
***
^ the trait `Buy` is not implemented for `{integer}`
   |         |
   |         required by a bound introduced by this call
   |
note: required by a bound in `buy`
  --> src/main.rs:11:22
   |
11 | fn buy(product: impl Buy) {
   |                      ^^^ required by this bound in `buy`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `dad` (bin "errand") due to previous error
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] -1 points 1 year ago
fn main(){
    let mut input = std::io::stdin().lines();
    let num0 = input.next().unwrap().unwrap();
    let num1 = input.next().unwrap().unwrap();
    println!("{}", num0 + &num1);
}