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