]>
Commit | Line | Data |
---|---|---|
dc9dc135 | 1 | error[E0507]: cannot move out of a shared reference |
48663c56 | 2 | --> $DIR/borrowck-move-in-irrefut-pat.rs:3:13 |
b7449926 XL |
3 | | |
4 | LL | 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 | 11 | error[E0507]: cannot move out of a shared reference |
48663c56 | 12 | --> $DIR/borrowck-move-in-irrefut-pat.rs:7:11 |
b7449926 XL |
13 | | |
14 | LL | 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 | 21 | error[E0507]: cannot move out of a shared reference |
48663c56 | 22 | --> $DIR/borrowck-move-in-irrefut-pat.rs:12:15 |
b7449926 XL |
23 | | |
24 | LL | 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 | |
31 | error: aborting due to 3 previous errors | |
32 | ||
33 | For more information about this error, try `rustc --explain E0507`. |