]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-error-with-note.stderr
Rollup merge of #59082 - alexreg:cosmetic-2-doc-comments, r=Centril
[rust.git] / src / test / ui / borrowck / borrowck-move-error-with-note.stderr
1 error[E0507]: cannot move out of borrowed content
2   --> $DIR/borrowck-move-error-with-note.rs:11:11
3    |
4 LL |     match *f {
5    |           ^^ cannot move out of borrowed content
6 LL |
7 LL |         Foo::Foo1(num1,
8    |                   ---- hint: to prevent move, use `ref num1` or `ref mut num1`
9 LL |                   num2) => (),
10    |                   ---- ...and here (use `ref num2` or `ref mut num2`)
11 LL |         Foo::Foo2(num) => (),
12    |                   --- ...and here (use `ref num` or `ref mut num`)
13
14 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
15   --> $DIR/borrowck-move-error-with-note.rs:30:9
16    |
17 LL | /         S {
18 LL | |
19 LL | |             f: _s,
20    | |                -- hint: to prevent move, use `ref _s` or `ref mut _s`
21 LL | |             g: _t
22    | |                -- ...and here (use `ref _t` or `ref mut _t`)
23 LL | |         } => {}
24    | |_________^ cannot move out of here
25
26 error[E0507]: cannot move out of borrowed content
27   --> $DIR/borrowck-move-error-with-note.rs:47:11
28    |
29 LL |     match a.a {
30    |           ^ cannot move out of borrowed content
31 LL |
32 LL |         n => {
33    |         - hint: to prevent move, use `ref n` or `ref mut n`
34
35 error: aborting due to 3 previous errors
36
37 Some errors occurred: E0507, E0509.
38 For more information about an error, try `rustc --explain E0507`.