]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/borrowck-move-error-with-note.stderr
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / borrowck / borrowck-move-error-with-note.stderr
1 error[E0507]: cannot move out of `f` as enum variant `Foo1` which is behind a shared reference
2   --> $DIR/borrowck-move-error-with-note.rs:11:11
3    |
4 LL |     match *f {
5    |           ^^ help: consider borrowing here: `&*f`
6 LL |         Foo::Foo1(num1,
7    |                   ---- data moved here
8 LL |                   num2) => (),
9    |                   ---- ...and here
10 LL |         Foo::Foo2(num) => (),
11    |                   --- ...and here
12    |
13    = note: move occurs because these variables have types that don't implement the `Copy` trait
14
15 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
16   --> $DIR/borrowck-move-error-with-note.rs:28:11
17    |
18 LL |     match (S {f: "foo".to_string(), g: "bar".to_string()}) {
19    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
20 ...
21 LL |             f: _s,
22    |                -- data moved here
23 LL |             g: _t
24    |                -- ...and here
25    |
26    = note: move occurs because these variables have types that don't implement the `Copy` trait
27
28 error[E0507]: cannot move out of `a.a` which is behind a shared reference
29   --> $DIR/borrowck-move-error-with-note.rs:46:11
30    |
31 LL |     match a.a {
32    |           ^^^ help: consider borrowing here: `&a.a`
33 LL |         n => {
34    |         -
35    |         |
36    |         data moved here
37    |         move occurs because `n` has type `Box<isize>`, which does not implement the `Copy` trait
38
39 error: aborting due to 3 previous errors
40
41 Some errors have detailed explanations: E0507, E0509.
42 For more information about an error, try `rustc --explain E0507`.