]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/borrowck-move-in-irrefut-pat.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / borrowck / borrowck-move-in-irrefut-pat.stderr
CommitLineData
dc9dc135 1error[E0507]: cannot move out of a shared reference
48663c56 2 --> $DIR/borrowck-move-in-irrefut-pat.rs:3:13
b7449926
XL
3 |
4LL | fn arg_item(&_x: &String) {}
5 | ^--
6 | ||
7 | |data moved here
1b1a35ee 8 | |move occurs because `_x` has type `String`, which does not implement the `Copy` trait
b7449926 9 | help: consider removing the `&`: `_x`
b7449926 10
dc9dc135 11error[E0507]: cannot move out of a shared reference
48663c56 12 --> $DIR/borrowck-move-in-irrefut-pat.rs:7:11
b7449926
XL
13 |
14LL | with(|&_x| ())
15 | ^--
16 | ||
17 | |data moved here
1b1a35ee 18 | |move occurs because `_x` has type `String`, which does not implement the `Copy` trait
b7449926 19 | help: consider removing the `&`: `_x`
b7449926 20
dc9dc135 21error[E0507]: cannot move out of a shared reference
48663c56 22 --> $DIR/borrowck-move-in-irrefut-pat.rs:12:15
b7449926
XL
23 |
24LL | let &_x = &"hi".to_string();
dc9dc135 25 | --- ^^^^^^^^^^^^^^^^^
b7449926
XL
26 | ||
27 | |data moved here
1b1a35ee 28 | |move occurs because `_x` has type `String`, which does not implement the `Copy` trait
b7449926 29 | help: consider removing the `&`: `_x`
b7449926
XL
30
31error: aborting due to 3 previous errors
32
33For more information about this error, try `rustc --explain E0507`.