@@ -35,7 +35,7 @@ fn simple_ref() {
35
35
//~| ERROR: Min Capture analysis includes:
36
36
* ref_s += 10 ;
37
37
//~^ NOTE: Capturing ref_s[Deref] -> MutBorrow
38
- //~| NOTE: Min Capture ref_s[Deref ] -> MutBorrow
38
+ //~| NOTE: Min Capture ref_s[] -> ByValue
39
39
} ;
40
40
c ( ) ;
41
41
}
@@ -56,7 +56,7 @@ fn struct_contains_ref_to_another_struct_1() {
56
56
//~| ERROR: Min Capture analysis includes:
57
57
t. 0 . 0 = "new s" . into ( ) ;
58
58
//~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> MutBorrow
59
- //~| NOTE: Min Capture t[(0, 0),Deref,(0, 0) ] -> MutBorrow
59
+ //~| NOTE: Min Capture t[(0, 0)] -> ByValue
60
60
} ;
61
61
62
62
c ( ) ;
@@ -79,7 +79,7 @@ fn struct_contains_ref_to_another_struct_2() {
79
79
//~| ERROR: Min Capture analysis includes:
80
80
let _t = t. 0 . 0 ;
81
81
//~^ NOTE: Capturing t[(0, 0),Deref,(0, 0)] -> ImmBorrow
82
- //~| NOTE: Min Capture t[(0, 0),Deref ] -> ImmBorrow
82
+ //~| NOTE: Min Capture t[(0, 0)] -> ByValue
83
83
} ;
84
84
85
85
c ( ) ;
@@ -175,7 +175,7 @@ fn box_mut_1() {
175
175
//~| First Pass analysis includes:
176
176
//~| NOTE: Capturing box_p_foo[Deref,Deref,(0, 0)] -> MutBorrow
177
177
//~| Min Capture analysis includes:
178
- //~| NOTE: Min Capture box_p_foo[Deref,Deref,(0, 0) ] -> MutBorrow
178
+ //~| NOTE: Min Capture box_p_foo[] -> ByValue
179
179
}
180
180
181
181
// Ensure that even in move closures, if the data is not owned by the root variable
@@ -192,7 +192,7 @@ fn box_mut_2() {
192
192
//~| First Pass analysis includes:
193
193
//~| NOTE: Capturing p_foo[Deref,Deref,(0, 0)] -> MutBorrow
194
194
//~| Min Capture analysis includes:
195
- //~| NOTE: Min Capture p_foo[Deref,Deref,(0, 0) ] -> MutBorrow
195
+ //~| NOTE: Min Capture p_foo[] -> ByValue
196
196
}
197
197
198
198
// Test that move closures can take ownership of Copy type
0 commit comments