@@ -12,7 +12,7 @@ fn arrays() {
12
12
|| {
13
13
let [ a, b, .., e] = arr;
14
14
//~^ ERROR: Capturing arr[Index] -> ByValue
15
- //~^^ ERROR: Min Capture arr[] -> ByValue
15
+ //~| ERROR: Min Capture arr[] -> ByValue
16
16
assert_eq ! ( a, "A" ) ;
17
17
assert_eq ! ( b, "B" ) ;
18
18
assert_eq ! ( e, "E" ) ;
@@ -35,9 +35,9 @@ fn structs() {
35
35
|| {
36
36
let Point { x : ref mut x, y : _, id : moved_id } = p;
37
37
//~^ ERROR: Capturing p[(0, 0)] -> MutBorrow
38
- //~^^ ERROR: Capturing p[(2, 0)] -> ByValue
39
- //~^^^ ERROR: Min Capture p[(0, 0)] -> MutBorrow
40
- //~^^^^ ERROR: Min Capture p[(2, 0)] -> ByValue
38
+ //~| ERROR: Capturing p[(2, 0)] -> ByValue
39
+ //~| ERROR: Min Capture p[(0, 0)] -> MutBorrow
40
+ //~| ERROR: Min Capture p[(2, 0)] -> ByValue
41
41
42
42
println ! ( "{}, {}" , x, moved_id) ;
43
43
} ;
@@ -52,11 +52,11 @@ fn tuples() {
52
52
|| {
53
53
let ( ref mut x, ref ref_str, ( moved_s, _) ) = t;
54
54
//~^ ERROR: Capturing t[(0, 0)] -> MutBorrow
55
- //~^^ ERROR: Capturing t[(1, 0)] -> ImmBorrow
56
- //~^^^ ERROR: Capturing t[(2, 0),(0, 0)] -> ByValue
57
- //~^^^^ ERROR: Min Capture t[(0, 0)] -> MutBorrow
58
- //~^^^^^ ERROR: Min Capture t[(1, 0)] -> ImmBorrow
59
- //~^^^^^^ ERROR: Min Capture t[(2, 0),(0, 0)] -> ByValue
55
+ //~| ERROR: Capturing t[(1, 0)] -> ImmBorrow
56
+ //~| ERROR: Capturing t[(2, 0),(0, 0)] -> ByValue
57
+ //~| ERROR: Min Capture t[(0, 0)] -> MutBorrow
58
+ //~| ERROR: Min Capture t[(1, 0)] -> ImmBorrow
59
+ //~| ERROR: Min Capture t[(2, 0),(0, 0)] -> ByValue
60
60
61
61
println ! ( "{}, {} {}" , x, ref_str, moved_s) ;
62
62
} ;
0 commit comments