]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/2229_closure_analysis/migrations/significant_drop.stderr
Add additional migrations to handle auto-traits and clone traits
[rust.git] / src / test / ui / closures / 2229_closure_analysis / migrations / significant_drop.stderr
1 error: drop order affected for closure because of `capture_disjoint_fields`
2   --> $DIR/significant_drop.rs:25:13
3    |
4 LL |       let c = || {
5    |  _____________^
6 LL | |
7 LL | |
8 LL | |         let _t = t.0;
9 LL | |         let _t1 = t1.0;
10 LL | |         let _t2 = t2.0;
11 LL | |     };
12    | |_____^
13    |
14 note: the lint level is defined here
15   --> $DIR/significant_drop.rs:2:9
16    |
17 LL | #![deny(disjoint_capture_migration)]
18    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
19 help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured
20    |
21 LL |     let c = || { let _ = (&t, &t1, &t2); 
22 LL |
23 LL |
24 LL |         let _t = t.0;
25 LL |         let _t1 = t1.0;
26 LL |         let _t2 = t2.0;
27  ...
28
29 error: drop order affected for closure because of `capture_disjoint_fields`
30   --> $DIR/significant_drop.rs:43:13
31    |
32 LL |       let c = || {
33    |  _____________^
34 LL | |
35 LL | |
36 LL | |         let _t = t.0;
37 LL | |         let _t1 = t1.0;
38 LL | |         let _t2 = t2;
39 LL | |     };
40    | |_____^
41    |
42 help: add a dummy let to cause `t`, `t1` to be fully captured
43    |
44 LL |     let c = || { let _ = (&t, &t1); 
45 LL |
46 LL |
47 LL |         let _t = t.0;
48 LL |         let _t1 = t1.0;
49 LL |         let _t2 = t2;
50  ...
51
52 error: drop order affected for closure because of `capture_disjoint_fields`
53   --> $DIR/significant_drop.rs:59:13
54    |
55 LL |       let c = || {
56    |  _____________^
57 LL | |
58 LL | |
59 LL | |         let _t = t.0;
60 LL | |         println!("{:?}", t1.1);
61 LL | |     };
62    | |_____^
63    |
64 help: add a dummy let to cause `t` to be fully captured
65    |
66 LL |     let c = || { let _ = &t; 
67 LL |
68 LL |
69 LL |         let _t = t.0;
70 LL |         println!("{:?}", t1.1);
71 LL |     };
72    |
73
74 error: drop order affected for closure because of `capture_disjoint_fields`
75   --> $DIR/significant_drop.rs:76:13
76    |
77 LL |       let c = || {
78    |  _____________^
79 LL | |
80 LL | |
81 LL | |         let _t = t.0;
82 LL | |     };
83    | |_____^
84    |
85 help: add a dummy let to cause `t` to be fully captured
86    |
87 LL |     let c = || { let _ = &t; 
88 LL |
89 LL |
90 LL |         let _t = t.0;
91 LL |     };
92    |
93
94 error: drop order affected for closure because of `capture_disjoint_fields`
95   --> $DIR/significant_drop.rs:91:13
96    |
97 LL |       let c = || {
98    |  _____________^
99 LL | |
100 LL | |
101 LL | |         let _t = t.0;
102 LL | |     };
103    | |_____^
104    |
105 help: add a dummy let to cause `t` to be fully captured
106    |
107 LL |     let c = || { let _ = &t; 
108 LL |
109 LL |
110 LL |         let _t = t.0;
111 LL |     };
112    |
113
114 error: drop order affected for closure because of `capture_disjoint_fields`
115   --> $DIR/significant_drop.rs:104:13
116    |
117 LL |       let c = || {
118    |  _____________^
119 LL | |
120 LL | |
121 LL | |         let _t = t.1;
122 LL | |     };
123    | |_____^
124    |
125 help: add a dummy let to cause `t` to be fully captured
126    |
127 LL |     let c = || { let _ = &t; 
128 LL |
129 LL |
130 LL |         let _t = t.1;
131 LL |     };
132    |
133
134 error: drop order affected for closure because of `capture_disjoint_fields`
135   --> $DIR/significant_drop.rs:119:13
136    |
137 LL |       let c = move || {
138    |  _____________^
139 LL | |
140 LL | |
141 LL | |         println!("{:?} {:?}", t1.1, t.1);
142 LL | |     };
143    | |_____^
144    |
145 help: add a dummy let to cause `t1`, `t` to be fully captured
146    |
147 LL |     let c = move || { let _ = (&t1, &t); 
148 LL |
149 LL |
150 LL |         println!("{:?} {:?}", t1.1, t.1);
151 LL |     };
152    |
153
154 error: aborting due to 7 previous errors
155