@@ -14,7 +14,7 @@ fn test1_all_need_migration() {
14
14
15
15
let c = || { let _ = (&t, &t1, &t2);
16
16
//~^ ERROR: drop order affected for closure because of `capture_disjoint_fields`
17
- //~| HELP:` let _ = (&t, &t1, &t2)` causes `t`, `t1`, `t2` to be fully captured
17
+ //~| HELP: add a dummy let to cause `t`, `t1`, `t2` to be fully captured
18
18
19
19
let _t = t.0;
20
20
let _t1 = t1.0;
@@ -33,7 +33,7 @@ fn test2_only_precise_paths_need_migration() {
33
33
34
34
let c = || { let _ = (&t, &t1);
35
35
//~^ ERROR: drop order affected for closure because of `capture_disjoint_fields`
36
- //~| HELP:` let _ = (&t, &t1)` causes `t`, `t1` to be fully captured
36
+ //~| HELP: add a dummy let to cause `t`, `t1` to be fully captured
37
37
let _t = t.0;
38
38
let _t1 = t1.0;
39
39
let _t2 = t2;
@@ -49,7 +49,7 @@ fn test3_only_by_value_need_migration() {
49
49
let t1 = (String::new(), String::new());
50
50
let c = || { let _ = &t;
51
51
//~^ ERROR: drop order affected for closure because of `capture_disjoint_fields`
52
- //~| HELP: `let _ = &t` causes `t` to be fully captured
52
+ //~| HELP: add a dummy let to cause `t` to be fully captured
53
53
let _t = t.0;
54
54
println!("{}", t1.1);
55
55
};
@@ -67,7 +67,7 @@ fn test4_only_non_copy_types_need_migration() {
67
67
68
68
let c = || { let _ = &t;
69
69
//~^ ERROR: drop order affected for closure because of `capture_disjoint_fields`
70
- //~| HELP: `let _ = &t` causes `t` to be fully captured
70
+ //~| HELP: add a dummy let to cause `t` to be fully captured
71
71
let _t = t.0;
72
72
let _t1 = t1.0;
73
73
};
@@ -85,7 +85,7 @@ fn test5_only_drop_types_need_migration() {
85
85
86
86
let c = || { let _ = &t;
87
87
//~^ ERROR: drop order affected for closure because of `capture_disjoint_fields`
88
- //~| HELP: `let _ = &t` causes `t` to be fully captured
88
+ //~| HELP: add a dummy let to cause `t` to be fully captured
89
89
let _t = t.0;
90
90
let _s = s.0;
91
91
};
@@ -100,7 +100,7 @@ fn test6_move_closures_non_copy_types_might_need_migration() {
100
100
let t1 = (String::new(), String::new());
101
101
let c = move || { let _ = (&t1, &t);
102
102
//~^ ERROR: drop order affected for closure because of `capture_disjoint_fields`
103
- //~| HELP: `let _ = (&t1, &t)` causes `t1`, `t` to be fully captured
103
+ //~| HELP: add a dummy let to cause `t1`, `t` to be fully captured
104
104
println!("{} {}", t1.1, t.1);
105
105
};
106
106
@@ -115,7 +115,7 @@ fn test7_drop_non_drop_aggregate_need_migration() {
115
115
116
116
let c = || { let _ = &t;
117
117
//~^ ERROR: drop order affected for closure because of `capture_disjoint_fields`
118
- //~| HELP: `let _ = &t` causes `t` to be fully captured
118
+ //~| HELP: add a dummy let to cause `t` to be fully captured
119
119
let _t = t.0;
120
120
};
121
121
0 commit comments