]> git.lizzy.rs Git - rust.git/blob - tests/ui/borrowck/borrowck-move-in-irrefut-pat.stderr
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / 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    |
10 help: consider removing the borrow
11    |
12 LL - fn arg_item(&_x: &String) {}
13 LL + fn arg_item(_x: &String) {}
14    |
15
16 error[E0507]: cannot move out of a shared reference
17   --> $DIR/borrowck-move-in-irrefut-pat.rs:7:11
18    |
19 LL |     with(|&_x| ())
20    |           ^--
21    |            |
22    |            data moved here
23    |            move occurs because `_x` has type `String`, which does not implement the `Copy` trait
24    |
25 help: consider removing the borrow
26    |
27 LL -     with(|&_x| ())
28 LL +     with(|_x| ())
29    |
30
31 error[E0507]: cannot move out of a shared reference
32   --> $DIR/borrowck-move-in-irrefut-pat.rs:12:15
33    |
34 LL |     let &_x = &"hi".to_string();
35    |          --   ^^^^^^^^^^^^^^^^^
36    |          |
37    |          data moved here
38    |          move occurs because `_x` has type `String`, which does not implement the `Copy` trait
39    |
40 help: consider removing the borrow
41    |
42 LL -     let &_x = &"hi".to_string();
43 LL +     let _x = &"hi".to_string();
44    |
45
46 error: aborting due to 3 previous errors
47
48 For more information about this error, try `rustc --explain E0507`.