]>
Commit | Line | Data |
---|---|---|
136023e0 | 1 | error: changes to closure capture in Rust 2021 will affect drop order |
cdc7bbd5 | 2 | --> $DIR/significant_drop.rs:25:13 |
5869c6ff | 3 | | |
136023e0 XL |
4 | LL | let c = || { |
5 | | ^^ | |
6 | ... | |
7 | LL | let _t = t.0; | |
94222f64 | 8 | | --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0` |
136023e0 XL |
9 | LL | |
10 | LL | let _t1 = t1.0; | |
94222f64 | 11 | | ---- in Rust 2018, this closure captures all of `t1`, but in Rust 2021, it will only capture `t1.0` |
136023e0 XL |
12 | LL | |
13 | LL | let _t2 = t2.0; | |
94222f64 | 14 | | ---- in Rust 2018, this closure captures all of `t2`, but in Rust 2021, it will only capture `t2.0` |
136023e0 XL |
15 | ... |
16 | LL | } | |
17 | | - | |
18 | | | | |
94222f64 XL |
19 | | in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure |
20 | | in Rust 2018, `t1` is dropped here, but in Rust 2021, only `t1.0` will be dropped here as part of the closure | |
21 | | in Rust 2018, `t2` is dropped here, but in Rust 2021, only `t2.0` will be dropped here as part of the closure | |
5869c6ff | 22 | | |
2b03887a | 23 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> |
5869c6ff | 24 | note: the lint level is defined here |
cdc7bbd5 | 25 | --> $DIR/significant_drop.rs:2:9 |
5869c6ff | 26 | | |
136023e0 XL |
27 | LL | #![deny(rust_2021_incompatible_closure_captures)] |
28 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
cdc7bbd5 XL |
29 | help: add a dummy let to cause `t`, `t1`, `t2` to be fully captured |
30 | | | |
94222f64 XL |
31 | LL ~ let c = || { |
32 | LL + let _ = (&t, &t1, &t2); | |
33 | | | |
5869c6ff | 34 | |
136023e0 XL |
35 | error: changes to closure capture in Rust 2021 will affect drop order |
36 | --> $DIR/significant_drop.rs:50:13 | |
5869c6ff | 37 | | |
136023e0 XL |
38 | LL | let c = || { |
39 | | ^^ | |
40 | ... | |
41 | LL | let _t = t.0; | |
94222f64 | 42 | | --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0` |
136023e0 XL |
43 | LL | |
44 | LL | let _t1 = t1.0; | |
94222f64 | 45 | | ---- in Rust 2018, this closure captures all of `t1`, but in Rust 2021, it will only capture `t1.0` |
136023e0 XL |
46 | ... |
47 | LL | } | |
48 | | - | |
49 | | | | |
94222f64 XL |
50 | | in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure |
51 | | in Rust 2018, `t1` is dropped here, but in Rust 2021, only `t1.0` will be dropped here as part of the closure | |
136023e0 XL |
52 | | |
53 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> | |
cdc7bbd5 XL |
54 | help: add a dummy let to cause `t`, `t1` to be fully captured |
55 | | | |
94222f64 XL |
56 | LL ~ let c = || { |
57 | LL + let _ = (&t, &t1); | |
58 | | | |
5869c6ff | 59 | |
136023e0 XL |
60 | error: changes to closure capture in Rust 2021 will affect drop order |
61 | --> $DIR/significant_drop.rs:71:13 | |
5869c6ff | 62 | | |
136023e0 XL |
63 | LL | let c = || { |
64 | | ^^ | |
65 | ... | |
66 | LL | let _t = t.0; | |
94222f64 | 67 | | --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0` |
136023e0 XL |
68 | ... |
69 | LL | } | |
94222f64 | 70 | | - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure |
136023e0 XL |
71 | | |
72 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> | |
cdc7bbd5 XL |
73 | help: add a dummy let to cause `t` to be fully captured |
74 | | | |
94222f64 XL |
75 | LL ~ let c = || { |
76 | LL + let _ = &t; | |
77 | | | |
5869c6ff | 78 | |
136023e0 XL |
79 | error: changes to closure capture in Rust 2021 will affect drop order |
80 | --> $DIR/significant_drop.rs:91:13 | |
5869c6ff | 81 | | |
136023e0 XL |
82 | LL | let c = || { |
83 | | ^^ | |
84 | ... | |
85 | LL | let _t = t.0; | |
94222f64 | 86 | | --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0` |
136023e0 XL |
87 | ... |
88 | LL | } | |
94222f64 | 89 | | - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure |
5869c6ff | 90 | | |
136023e0 | 91 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> |
cdc7bbd5 XL |
92 | help: add a dummy let to cause `t` to be fully captured |
93 | | | |
94222f64 XL |
94 | LL ~ let c = || { |
95 | LL + let _ = &t; | |
96 | | | |
5869c6ff | 97 | |
136023e0 XL |
98 | error: changes to closure capture in Rust 2021 will affect drop order |
99 | --> $DIR/significant_drop.rs:109:13 | |
5869c6ff | 100 | | |
136023e0 XL |
101 | LL | let c = || { |
102 | | ^^ | |
103 | ... | |
104 | LL | let _t = t.0; | |
94222f64 | 105 | | --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.0` |
136023e0 XL |
106 | ... |
107 | LL | } | |
94222f64 | 108 | | - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.0` will be dropped here as part of the closure |
5869c6ff | 109 | | |
136023e0 | 110 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> |
cdc7bbd5 XL |
111 | help: add a dummy let to cause `t` to be fully captured |
112 | | | |
94222f64 XL |
113 | LL ~ let c = || { |
114 | LL + let _ = &t; | |
115 | | | |
5869c6ff | 116 | |
136023e0 XL |
117 | error: changes to closure capture in Rust 2021 will affect drop order |
118 | --> $DIR/significant_drop.rs:125:13 | |
5869c6ff | 119 | | |
136023e0 XL |
120 | LL | let c = || { |
121 | | ^^ | |
122 | ... | |
123 | LL | let _t = t.1; | |
94222f64 | 124 | | --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.1` |
136023e0 XL |
125 | ... |
126 | LL | } | |
94222f64 | 127 | | - in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.1` will be dropped here as part of the closure |
5869c6ff | 128 | | |
136023e0 | 129 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> |
cdc7bbd5 XL |
130 | help: add a dummy let to cause `t` to be fully captured |
131 | | | |
94222f64 XL |
132 | LL ~ let c = || { |
133 | LL + let _ = &t; | |
134 | | | |
5869c6ff | 135 | |
136023e0 XL |
136 | error: changes to closure capture in Rust 2021 will affect drop order |
137 | --> $DIR/significant_drop.rs:143:13 | |
5869c6ff | 138 | | |
136023e0 XL |
139 | LL | let c = move || { |
140 | | ^^^^^^^ | |
141 | ... | |
142 | LL | println!("{:?} {:?}", t1.1, t.1); | |
94222f64 | 143 | | ---- --- in Rust 2018, this closure captures all of `t`, but in Rust 2021, it will only capture `t.1` |
136023e0 | 144 | | | |
94222f64 | 145 | | in Rust 2018, this closure captures all of `t1`, but in Rust 2021, it will only capture `t1.1` |
136023e0 XL |
146 | ... |
147 | LL | } | |
148 | | - | |
149 | | | | |
94222f64 XL |
150 | | in Rust 2018, `t1` is dropped here, but in Rust 2021, only `t1.1` will be dropped here as part of the closure |
151 | | in Rust 2018, `t` is dropped here, but in Rust 2021, only `t.1` will be dropped here as part of the closure | |
136023e0 XL |
152 | | |
153 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> | |
cdc7bbd5 XL |
154 | help: add a dummy let to cause `t1`, `t` to be fully captured |
155 | | | |
94222f64 XL |
156 | LL ~ let c = move || { |
157 | LL + let _ = (&t1, &t); | |
158 | | | |
136023e0 XL |
159 | |
160 | error: changes to closure capture in Rust 2021 will affect drop order | |
161 | --> $DIR/significant_drop.rs:163:21 | |
162 | | | |
163 | LL | let c = || { | |
164 | | ^^ | |
165 | ... | |
166 | LL | tuple.0; | |
94222f64 | 167 | | ------- in Rust 2018, this closure captures all of `tuple`, but in Rust 2021, it will only capture `tuple.0` |
136023e0 XL |
168 | ... |
169 | LL | } | |
94222f64 | 170 | | - in Rust 2018, `tuple` is dropped here, but in Rust 2021, only `tuple.0` will be dropped here as part of the closure |
136023e0 XL |
171 | | |
172 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> | |
173 | help: add a dummy let to cause `tuple` to be fully captured | |
174 | | | |
94222f64 XL |
175 | LL ~ let c = || { |
176 | LL + let _ = &tuple; | |
177 | | | |
136023e0 XL |
178 | |
179 | error: changes to closure capture in Rust 2021 will affect drop order | |
180 | --> $DIR/significant_drop.rs:181:17 | |
181 | | | |
182 | LL | let c = || { | |
183 | | ^^ | |
184 | ... | |
185 | LL | tuple.0; | |
94222f64 | 186 | | ------- in Rust 2018, this closure captures all of `tuple`, but in Rust 2021, it will only capture `tuple.0` |
136023e0 | 187 | ... |
cdc7bbd5 | 188 | LL | }; |
94222f64 | 189 | | - in Rust 2018, `tuple` is dropped here, but in Rust 2021, only `tuple.0` will be dropped here as part of the closure |
136023e0 XL |
190 | | |
191 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> | |
192 | help: add a dummy let to cause `tuple` to be fully captured | |
cdc7bbd5 | 193 | | |
94222f64 XL |
194 | LL ~ let c = || { |
195 | LL + let _ = &tuple; | |
196 | | | |
197 | ||
198 | error: changes to closure capture in Rust 2021 will affect drop order | |
199 | --> $DIR/significant_drop.rs:201:18 | |
200 | | | |
201 | LL | let _c = || tup.0; | |
064997fb | 202 | | ^^ ----- in Rust 2018, this closure captures all of `tup`, but in Rust 2021, it will only capture `tup.0` |
94222f64 XL |
203 | ... |
204 | LL | } | |
205 | | - in Rust 2018, `tup` is dropped here, but in Rust 2021, only `tup.0` will be dropped here as part of the closure | |
206 | | | |
207 | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/disjoint-capture-in-closures.html> | |
208 | help: add a dummy let to cause `tup` to be fully captured | |
209 | | | |
210 | LL | let _c = || { let _ = &tup; tup.0 }; | |
211 | | +++++++++++++++ + | |
5869c6ff | 212 | |
94222f64 | 213 | error: aborting due to 10 previous errors |
5869c6ff | 214 |