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