@@ -132,7 +132,7 @@ LL | if let () = { match Droppy.get() { Some(_value) => {} _ => {}} } {
132
132
| ~~~~~ +++++++++++++++++ ++++++++
133
133
134
134
error: `if let` assigns a shorter lifetime since Edition 2024
135
- --> $DIR/lint-if-let-rescope.rs:72 :12
135
+ --> $DIR/lint-if-let-rescope.rs:73 :12
136
136
|
137
137
LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
138
138
| ^^^^^^^^^^^^^^^^^^^--------^^^^^^
@@ -142,7 +142,7 @@ LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
142
142
= warning: this changes meaning in Rust 2024
143
143
= note: for more information, see issue #124085 <https://github.com/rust-lang/rust/issues/124085>
144
144
help: the value is now dropped here in Edition 2024
145
- --> $DIR/lint-if-let-rescope.rs:72 :53
145
+ --> $DIR/lint-if-let-rescope.rs:73 :53
146
146
|
147
147
LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
148
148
| ^
@@ -151,5 +151,45 @@ help: a `match` with a single arm can preserve the drop order up to Edition 2021
151
151
LL | if (match droppy().get() { Some(_value) => { true } _ => { false }}) {
152
152
| ~~~~~ +++++++++++++++++ ~~~~ +
153
153
154
- error: aborting due to 6 previous errors
154
+ error: `if let` assigns a shorter lifetime since Edition 2024
155
+ --> $DIR/lint-if-let-rescope.rs:79:21
156
+ |
157
+ LL | } else if (((if let Some(_value) = droppy().get() { true } else { false }))) {
158
+ | ^^^^^^^^^^^^^^^^^^^--------^^^^^^
159
+ | |
160
+ | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
161
+ |
162
+ = warning: this changes meaning in Rust 2024
163
+ = note: for more information, see issue #124085 <https://github.com/rust-lang/rust/issues/124085>
164
+ help: the value is now dropped here in Edition 2024
165
+ --> $DIR/lint-if-let-rescope.rs:79:62
166
+ |
167
+ LL | } else if (((if let Some(_value) = droppy().get() { true } else { false }))) {
168
+ | ^
169
+ help: a `match` with a single arm can preserve the drop order up to Edition 2021
170
+ |
171
+ LL | } else if (((match droppy().get() { Some(_value) => { true } _ => { false }}))) {
172
+ | ~~~~~ +++++++++++++++++ ~~~~ +
173
+
174
+ error: `if let` assigns a shorter lifetime since Edition 2024
175
+ --> $DIR/lint-if-let-rescope.rs:91:15
176
+ |
177
+ LL | while (if let Some(_value) = droppy().get() { false } else { true }) {
178
+ | ^^^^^^^^^^^^^^^^^^^--------^^^^^^
179
+ | |
180
+ | this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
181
+ |
182
+ = warning: this changes meaning in Rust 2024
183
+ = note: for more information, see issue #124085 <https://github.com/rust-lang/rust/issues/124085>
184
+ help: the value is now dropped here in Edition 2024
185
+ --> $DIR/lint-if-let-rescope.rs:91:57
186
+ |
187
+ LL | while (if let Some(_value) = droppy().get() { false } else { true }) {
188
+ | ^
189
+ help: a `match` with a single arm can preserve the drop order up to Edition 2021
190
+ |
191
+ LL | while (match droppy().get() { Some(_value) => { false } _ => { true }}) {
192
+ | ~~~~~ +++++++++++++++++ ~~~~ +
193
+
194
+ error: aborting due to 8 previous errors
155
195
0 commit comments