blob: 67fae606c4e43fec6925347e9df81a073a54420b [file] [log] [blame]
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:12:11
|
LL | let x = "hi".to_string();
| - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
LL | let _y = Foo { f:x };
| - value moved here
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:18:11
|
LL | let x = "hi".to_string();
| - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
LL | let _y = (x, 3);
| - value moved here
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:35:11
|
LL | let x = "hi".to_string();
| - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
...
LL | x
| - value moved here
...
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `y`
--> $DIR/moves-based-on-type-exprs.rs:36:11
|
LL | let y = "ho".to_string();
| - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait
...
LL | y
| - value moved here
...
LL | touch(&y);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:46:11
|
LL | let x = "hi".to_string();
| - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
...
LL | true => x,
| - value moved here
...
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `y`
--> $DIR/moves-based-on-type-exprs.rs:47:11
|
LL | let y = "ho".to_string();
| - move occurs because `y` has type `std::string::String`, which does not implement the `Copy` trait
...
LL | false => y
| - value moved here
...
LL | touch(&y);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:58:11
|
LL | let x = "hi".to_string();
| - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
...
LL | _ if guard(x) => 10,
| - value moved here
...
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:65:11
|
LL | let x = "hi".to_string();
| - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
LL | let _y = [x];
| - value moved here
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:71:11
|
LL | let x = "hi".to_string();
| - move occurs because `x` has type `std::string::String`, which does not implement the `Copy` trait
LL | let _y = vec![x];
| - value moved here
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:77:11
|
LL | let x = vec!["hi".to_string()];
| - move occurs because `x` has type `std::vec::Vec<std::string::String>`, which does not implement the `Copy` trait
LL | let _y = x.into_iter().next().unwrap();
| - value moved here
LL | touch(&x);
| ^^ value borrowed here after move
error[E0382]: borrow of moved value: `x`
--> $DIR/moves-based-on-type-exprs.rs:83:11
|
LL | let x = vec!["hi".to_string()];
| - move occurs because `x` has type `std::vec::Vec<std::string::String>`, which does not implement the `Copy` trait
LL | let _y = [x.into_iter().next().unwrap(); 1];
| - value moved here
LL | touch(&x);
| ^^ value borrowed here after move
error: aborting due to 11 previous errors
For more information about this error, try `rustc --explain E0382`.