@@ -19,7 +19,7 @@ fn a() {
19
19
[ box ref _a, _, _] => {
20
20
//~^ borrow of `vec[..]` occurs here
21
21
vec[ 0 ] = box 4 ; //~ ERROR cannot assign
22
- //~^ assignment to `vec[..]` occurs here
22
+ //~^ assignment to borrowed `vec[..]` occurs here
23
23
}
24
24
}
25
25
}
@@ -31,7 +31,7 @@ fn b() {
31
31
[ _b..] => {
32
32
//~^ borrow of `vec[..]` occurs here
33
33
vec[ 0 ] = box 4 ; //~ ERROR cannot assign
34
- //~^ assignment to `vec[..]` occurs here
34
+ //~^ assignment to borrowed `vec[..]` occurs here
35
35
}
36
36
}
37
37
}
@@ -41,8 +41,8 @@ fn c() {
41
41
let vec: & mut [ Box < isize > ] = & mut vec;
42
42
match vec {
43
43
[ _a, //~ ERROR cannot move out
44
- //~| move occurs here
45
- //~| attempting to move value to here
44
+ //~| cannot move out
45
+ //~| to prevent move
46
46
_b..] => {
47
47
// Note: `_a` is *moved* here, but `b` is borrowing,
48
48
// hence illegal.
@@ -53,38 +53,38 @@ fn c() {
53
53
_ => { }
54
54
}
55
55
let a = vec[ 0 ] ; //~ ERROR cannot move out
56
- //~^ NOTE attempting to move value to here
57
- //~| can not move out of here
56
+ //~^ NOTE to prevent move
57
+ //~| cannot move out of here
58
58
}
59
59
60
60
fn d ( ) {
61
61
let mut vec = vec ! ( box 1 , box 2 , box 3 ) ;
62
62
let vec: & mut [ Box < isize > ] = & mut vec;
63
63
match vec {
64
64
[ _a.., //~ ERROR cannot move out
65
- //~^ move occurs here
66
- _b] => { } //~ NOTE attempting to move value to here
65
+ //~^ cannot move out
66
+ _b] => { } //~ NOTE to prevent move
67
67
_ => { }
68
68
}
69
69
let a = vec[ 0 ] ; //~ ERROR cannot move out
70
- //~^ NOTE attempting to move value to here
71
- //~| can not move out of here
70
+ //~^ NOTE to prevent move
71
+ //~| cannot move out of here
72
72
}
73
73
74
74
fn e ( ) {
75
75
let mut vec = vec ! ( box 1 , box 2 , box 3 ) ;
76
76
let vec: & mut [ Box < isize > ] = & mut vec;
77
77
match vec {
78
78
[ _a, _b, _c] => { } //~ ERROR cannot move out
79
- //~| move occurs here
80
- //~| NOTE attempting to move value to here
79
+ //~| cannot move out
80
+ //~| NOTE to prevent move
81
81
//~| NOTE and here
82
82
//~| NOTE and here
83
83
_ => { }
84
84
}
85
85
let a = vec[ 0 ] ; //~ ERROR cannot move out
86
- //~^ NOTE attempting to move value to here
87
- //~| can not move out of here
86
+ //~^ NOTE to prevent move
87
+ //~| cannot move out of here
88
88
}
89
89
90
90
fn main ( ) { }
0 commit comments