]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-in-irrefut-pat.ast.nll.stderr
Update output for borrowck=migrate compare mode.
[rust.git] / src / test / ui / borrowck / borrowck-move-in-irrefut-pat.ast.nll.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/borrowck-move-in-irrefut-pat.rs:16:13
3    |
4 LL | fn arg_item(&_x: &String) {}
5    |             ^--
6    |             ||
7    |             |data moved here
8    |             cannot move out of borrowed content
9    |             help: consider removing the `&`: `_x`
10    |
11 note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait
12   --> $DIR/borrowck-move-in-irrefut-pat.rs:16:14
13    |
14 LL | fn arg_item(&_x: &String) {}
15    |              ^^
16
17 error[E0507]: cannot move out of data in a `&` reference
18   --> $DIR/borrowck-move-in-irrefut-pat.rs:16:14
19    |
20 LL | fn arg_item(&_x: &String) {}
21    |              ^^
22    |              |
23    |              cannot move out of data in a `&` reference
24    |              cannot move
25
26 error[E0507]: cannot move out of borrowed content
27   --> $DIR/borrowck-move-in-irrefut-pat.rs:21:11
28    |
29 LL |     with(|&_x| ())
30    |           ^--
31    |           ||
32    |           |data moved here
33    |           cannot move out of borrowed content
34    |           help: consider removing the `&`: `_x`
35    |
36 note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait
37   --> $DIR/borrowck-move-in-irrefut-pat.rs:21:12
38    |
39 LL |     with(|&_x| ())
40    |            ^^
41
42 error[E0507]: cannot move out of data in a `&` reference
43   --> $DIR/borrowck-move-in-irrefut-pat.rs:21:12
44    |
45 LL |     with(|&_x| ())
46    |            ^^
47    |            |
48    |            cannot move out of data in a `&` reference
49    |            cannot move
50
51 error[E0507]: cannot move out of data in a `&` reference
52   --> $DIR/borrowck-move-in-irrefut-pat.rs:27:10
53    |
54 LL |     let &_x = &"hi".to_string();
55    |          ^^
56    |          |
57    |          cannot move out of data in a `&` reference
58    |          cannot move
59
60 error[E0507]: cannot move out of borrowed content
61   --> $DIR/borrowck-move-in-irrefut-pat.rs:27:15
62    |
63 LL |     let &_x = &"hi".to_string();
64    |         ---   ^^^^^^^^^^^^^^^^^ cannot move out of borrowed content
65    |         ||
66    |         |data moved here
67    |         help: consider removing the `&`: `_x`
68    |
69 note: move occurs because `_x` has type `std::string::String`, which does not implement the `Copy` trait
70   --> $DIR/borrowck-move-in-irrefut-pat.rs:27:10
71    |
72 LL |     let &_x = &"hi".to_string();
73    |          ^^
74
75 error: aborting due to 6 previous errors
76
77 For more information about this error, try `rustc --explain E0507`.