]>
Commit | Line | Data |
---|---|---|
48663c56 XL |
1 | error[E0382]: borrow of moved value: `x` |
2 | --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:12:11 | |
b7449926 | 3 | | |
48663c56 | 4 | LL | let x = "hi".to_string(); |
1b1a35ee | 5 | | - move occurs because `x` has type `String`, which does not implement the `Copy` trait |
48663c56 | 6 | LL | |
b7449926 XL |
7 | LL | let _y = Foo { f:x }; |
8 | | - value moved here | |
532ac7d7 XL |
9 | LL | |
10 | LL | touch(&x); | |
48663c56 | 11 | | ^^ value borrowed here after move |
b7449926 | 12 | |
48663c56 XL |
13 | error[E0382]: borrow of moved value: `x` |
14 | --> $DIR/moves-based-on-type-distribute-copy-over-paren.rs:21:11 | |
b7449926 | 15 | | |
48663c56 | 16 | LL | let x = "hi".to_string(); |
1b1a35ee | 17 | | - move occurs because `x` has type `String`, which does not implement the `Copy` trait |
48663c56 | 18 | LL | |
b7449926 XL |
19 | LL | let _y = Foo { f:(((x))) }; |
20 | | ------- value moved here | |
532ac7d7 XL |
21 | LL | |
22 | LL | touch(&x); | |
48663c56 | 23 | | ^^ value borrowed here after move |
b7449926 XL |
24 | |
25 | error: aborting due to 2 previous errors | |
26 | ||
27 | For more information about this error, try `rustc --explain E0382`. |