@@ -132,7 +132,7 @@ LL | if let () = { match Droppy.get() { Some(_value) => {} _ => {}} } {
132132 | ~~~~~ +++++++++++++++++ ++++++++
133133
134134error: `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
136136 |
137137LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
138138 | ^^^^^^^^^^^^^^^^^^^--------^^^^^^
@@ -142,7 +142,7 @@ LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
142142 = warning: this changes meaning in Rust 2024
143143 = note: for more information, see issue #124085 <https://github.com/rust-lang/rust/issues/124085>
144144help: 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
146146 |
147147LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
148148 | ^
@@ -151,5 +151,45 @@ help: a `match` with a single arm can preserve the drop order up to Edition 2021
151151LL | if (match droppy().get() { Some(_value) => { true } _ => { false }}) {
152152 | ~~~~~ +++++++++++++++++ ~~~~ +
153153
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
155195
0 commit comments