1
- error[E0507]: cannot move out of borrowed content
1
+ error[E0507]: cannot move out of `f.0` which is behind a shared reference
2
2
--> $DIR/borrowck-move-error-with-note.rs:11:11
3
3
|
4
4
LL | match *f {
5
- | ^^
6
- | |
7
- | cannot move out of borrowed content
8
- | help: consider removing the `*`: `f`
9
- LL |
5
+ | ^^ help: consider removing the `*`: `f`
10
6
LL | Foo::Foo1(num1,
11
7
| ---- data moved here
12
8
LL | num2) => (),
@@ -15,7 +11,7 @@ LL | Foo::Foo2(num) => (),
15
11
| --- ...and here
16
12
|
17
13
note: move occurs because these variables have types that don't implement the `Copy` trait
18
- --> $DIR/borrowck-move-error-with-note.rs:13 :19
14
+ --> $DIR/borrowck-move-error-with-note.rs:12 :19
19
15
|
20
16
LL | Foo::Foo1(num1,
21
17
| ^^^^
@@ -25,7 +21,7 @@ LL | Foo::Foo2(num) => (),
25
21
| ^^^
26
22
27
23
error[E0509]: cannot move out of type `S`, which implements the `Drop` trait
28
- --> $DIR/borrowck-move-error-with-note.rs:29 :11
24
+ --> $DIR/borrowck-move-error-with-note.rs:28 :11
29
25
|
30
26
LL | match (S {f: "foo".to_string(), g: "bar".to_string()}) {
31
27
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot move out of here
@@ -36,30 +32,23 @@ LL | g: _t
36
32
| -- ...and here
37
33
|
38
34
note: move occurs because these variables have types that don't implement the `Copy` trait
39
- --> $DIR/borrowck-move-error-with-note.rs:33 :16
35
+ --> $DIR/borrowck-move-error-with-note.rs:31 :16
40
36
|
41
37
LL | f: _s,
42
38
| ^^
43
39
LL | g: _t
44
40
| ^^
45
41
46
- error[E0507]: cannot move out of borrowed content
47
- --> $DIR/borrowck-move-error-with-note.rs:48 :11
42
+ error[E0507]: cannot move out of `a.a` which is behind a shared reference
43
+ --> $DIR/borrowck-move-error-with-note.rs:46 :11
48
44
|
49
45
LL | match a.a {
50
- | ^^^
51
- | |
52
- | cannot move out of borrowed content
53
- | help: consider borrowing here: `&a.a`
54
- LL |
46
+ | ^^^ help: consider borrowing here: `&a.a`
55
47
LL | n => {
56
- | - data moved here
57
- |
58
- note: move occurs because `n` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
59
- --> $DIR/borrowck-move-error-with-note.rs:50:9
60
- |
61
- LL | n => {
62
- | ^
48
+ | -
49
+ | |
50
+ | data moved here
51
+ | move occurs because `n` has type `std::boxed::Box<isize>`, which does not implement the `Copy` trait
63
52
64
53
error: aborting due to 3 previous errors
65
54
0 commit comments