1 error[E0507]: cannot move out of borrowed content
2 --> $DIR/borrowck-move-error-with-note.rs:21:11
4 LL | match *f { //~ ERROR cannot move out of
7 | cannot move out of borrowed content
8 | help: consider removing the `*`: `f`
9 LL | //~| cannot move out
11 | ---- data moved here
14 LL | Foo::Foo2(num) => (),
17 note: move occurs because these variables have types that don't implement the `Copy` trait
18 --> $DIR/borrowck-move-error-with-note.rs:23:19
24 LL | Foo::Foo2(num) => (),
27 error[E0507]: cannot move out of `f.0` which is behind a `&` reference
28 --> $DIR/borrowck-move-error-with-note.rs:23:19
30 LL | let f = &Foo::Foo1(box 1, box 2);
31 | ------------------------ help: consider changing this to be a mutable reference: `&mut Foo::Foo1(box 1, box 2)`
36 | cannot move out of `f.0` which is behind a `&` reference
37 | `f` is a `&` reference, so the data it refers to cannot be moved
39 error[E0507]: cannot move out of `f.1` which is behind a `&` reference
40 --> $DIR/borrowck-move-error-with-note.rs:24:19
42 LL | let f = &Foo::Foo1(box 1, box 2);
43 | ------------------------ help: consider changing this to be a mutable reference: `&mut Foo::Foo1(box 1, box 2)`
48 | cannot move out of `f.1` which is behind a `&` reference
49 | `f` is a `&` reference, so the data it refers to cannot be moved
51 error[E0507]: cannot move out of `f.0` which is behind a `&` reference
52 --> $DIR/borrowck-move-error-with-note.rs:25:19
54 LL | let f = &Foo::Foo1(box 1, box 2);
55 | ------------------------ help: consider changing this to be a mutable reference: `&mut Foo::Foo1(box 1, box 2)`
57 LL | Foo::Foo2(num) => (),
60 | cannot move out of `f.0` which is behind a `&` reference
61 | `f` is a `&` reference, so the data it refers to cannot be moved
63 error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
64 --> $DIR/borrowck-move-error-with-note.rs:39:11
66 LL | match (S {f: "foo".to_string(), g: "bar".to_string()}) {
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
74 note: move occurs because these variables have types that don't implement the `Copy` trait
75 --> $DIR/borrowck-move-error-with-note.rs:42:16
82 error[E0507]: cannot move out of borrowed content
83 --> $DIR/borrowck-move-error-with-note.rs:57:11
85 LL | match a.a { //~ ERROR cannot move out of
88 | cannot move out of borrowed content
89 | help: consider borrowing here: `&a.a`
90 LL | //~| cannot move out
94 note: move occurs because `n` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
95 --> $DIR/borrowck-move-error-with-note.rs:59:9
100 error[E0507]: cannot move out of `a.a` which is behind a `&` reference
101 --> $DIR/borrowck-move-error-with-note.rs:59:9
103 LL | let a = &A { a: box 1 };
104 | --------------- help: consider changing this to be a mutable reference: `&mut A { a: box 1 }`
109 | cannot move out of `a.a` which is behind a `&` reference
110 | `a` is a `&` reference, so the data it refers to cannot be moved
112 error: aborting due to 7 previous errors
114 Some errors occurred: E0507, E0509.
115 For more information about an error, try `rustc --explain E0507`.