rust/tests/ui/drop/lint-if-let-rescope-with-macro.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1.4 KiB
Plaintext
Raw Normal View History

error: `if let` assigns a shorter lifetime since Edition 2024
2024-10-20 16:06:30 -05:00
--> $DIR/lint-if-let-rescope-with-macro.rs:12:12
|
LL | if let $p = $e { $($conseq)* } else { $($alt)* }
| ^^^
...
LL | / edition_2021_if_let! {
LL | | Some(_value),
LL | | droppy().get(),
| | -------- this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
LL | | {}
LL | | {}
LL | | };
| |_____- in this macro invocation
|
= warning: this changes meaning in Rust 2024
= note: for more information, see issue #124085 <https://github.com/rust-lang/rust/issues/124085>
help: the value is now dropped here in Edition 2024
2024-10-20 16:06:30 -05:00
--> $DIR/lint-if-let-rescope-with-macro.rs:12:38
|
LL | if let $p = $e { $($conseq)* } else { $($alt)* }
| ^
...
LL | / edition_2021_if_let! {
LL | | Some(_value),
LL | | droppy().get(),
LL | | {}
LL | | {}
LL | | };
| |_____- in this macro invocation
note: the lint level is defined here
2024-10-20 16:06:30 -05:00
--> $DIR/lint-if-let-rescope-with-macro.rs:7:9
|
LL | #![deny(if_let_rescope)]
| ^^^^^^^^^^^^^^
= note: this error originates in the macro `edition_2021_if_let` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 1 previous error