]> git.lizzy.rs Git - rust.git/blob - src/test/ui/ref-suggestion.stderr
Auto merge of #67000 - spastorino:remove-promoted-from-place, r=oli-obk
[rust.git] / src / test / ui / ref-suggestion.stderr
1 error[E0382]: use of moved value: `x`
2   --> $DIR/ref-suggestion.rs:4:5
3    |
4 LL |     let x = vec![1];
5    |         - move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
6 LL |     let y = x;
7    |             - value moved here
8 LL |     x;
9    |     ^ value used here after move
10
11 error[E0382]: use of moved value: `x`
12   --> $DIR/ref-suggestion.rs:8:5
13    |
14 LL |     let x = vec![1];
15    |         - move occurs because `x` has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
16 LL |     let mut y = x;
17    |                 - value moved here
18 LL |     x;
19    |     ^ value used here after move
20
21 error[E0382]: use of moved value: `x`
22   --> $DIR/ref-suggestion.rs:16:5
23    |
24 LL |         (Some(y), ()) => {},
25    |               - value moved here
26 ...
27 LL |     x;
28    |     ^ value used here after partial move
29    |
30    = note: move occurs because value has type `std::vec::Vec<i32>`, which does not implement the `Copy` trait
31
32 error: aborting due to 3 previous errors
33
34 For more information about this error, try `rustc --explain E0382`.