mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 05:51:58 +00:00
196 lines
8.7 KiB
Plaintext
196 lines
8.7 KiB
Plaintext
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:27:8
|
|
|
|
|
LL | if let Some(_value) = droppy().get() {
|
|
| ^^^^^^^^^^^^^^^^^^^--------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:32:5
|
|
|
|
|
LL | } else {
|
|
| ^
|
|
note: the lint level is defined here
|
|
--> $DIR/lint-if-let-rescope.rs:3:9
|
|
|
|
|
LL | #![deny(if_let_rescope)]
|
|
| ^^^^^^^^^^^^^^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL ~ match droppy().get() { Some(_value) => {
|
|
LL |
|
|
...
|
|
LL | // do something
|
|
LL ~ } _ => {
|
|
LL |
|
|
LL | // do something else
|
|
LL ~ }}
|
|
|
|
|
|
|
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:37:8
|
|
|
|
|
LL | if let Some(_value) = droppy().get() {
|
|
| ^^^^^^^^^^^^^^^^^^^--------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
...
|
|
LL | } else if let Some(_value) = droppy().get() {
|
|
| -------- this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:42:5
|
|
|
|
|
LL | } else if let Some(_value) = droppy().get() {
|
|
| ^
|
|
help: the value is now dropped here in Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:45:5
|
|
|
|
|
LL | }
|
|
| ^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL ~ match droppy().get() { Some(_value) => {
|
|
LL |
|
|
...
|
|
LL | // do something
|
|
LL ~ } _ => { match droppy().get() { Some(_value) => {
|
|
LL |
|
|
LL | // do something else
|
|
LL ~ } _ => {}}}}
|
|
|
|
|
|
|
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:50:15
|
|
|
|
|
LL | } else if let Some(_value) = droppy().get() {
|
|
| ^^^^^^^^^^^^^^^^^^^--------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:54:5
|
|
|
|
|
LL | } else if droppy().get().is_none() {
|
|
| ^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL ~ } else { match droppy().get() { Some(_value) => {
|
|
LL |
|
|
LL |
|
|
LL |
|
|
LL ~ } _ => if droppy().get().is_none() {
|
|
LL |
|
|
LL ~ }}}
|
|
|
|
|
|
|
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:58:27
|
|
|
|
|
LL | if let Some(1) = { if let Some(_value) = Droppy.get() { Some(1) } else { None } } {
|
|
| ^^^^^^^^^^^^^^^^^^^------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:58:69
|
|
|
|
|
LL | if let Some(1) = { if let Some(_value) = Droppy.get() { Some(1) } else { None } } {
|
|
| ^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL | if let Some(1) = { match Droppy.get() { Some(_value) => { Some(1) } _ => { None }} } {
|
|
| ~~~~~ +++++++++++++++++ ~~~~ +
|
|
|
|
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:65:22
|
|
|
|
|
LL | if let () = { if let Some(_value) = Droppy.get() {} } {
|
|
| ^^^^^^^^^^^^^^^^^^^------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:65:55
|
|
|
|
|
LL | if let () = { if let Some(_value) = Droppy.get() {} } {
|
|
| ^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL | if let () = { match Droppy.get() { Some(_value) => {} _ => {}} } {
|
|
| ~~~~~ +++++++++++++++++ ++++++++
|
|
|
|
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:73:12
|
|
|
|
|
LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
|
|
| ^^^^^^^^^^^^^^^^^^^--------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:73:53
|
|
|
|
|
LL | if (if let Some(_value) = droppy().get() { true } else { false }) {
|
|
| ^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL | if (match droppy().get() { Some(_value) => { true } _ => { false }}) {
|
|
| ~~~~~ +++++++++++++++++ ~~~~ +
|
|
|
|
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:79:21
|
|
|
|
|
LL | } else if (((if let Some(_value) = droppy().get() { true } else { false }))) {
|
|
| ^^^^^^^^^^^^^^^^^^^--------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:79:62
|
|
|
|
|
LL | } else if (((if let Some(_value) = droppy().get() { true } else { false }))) {
|
|
| ^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL | } else if (((match droppy().get() { Some(_value) => { true } _ => { false }}))) {
|
|
| ~~~~~ +++++++++++++++++ ~~~~ +
|
|
|
|
error: `if let` assigns a shorter lifetime since Edition 2024
|
|
--> $DIR/lint-if-let-rescope.rs:91:15
|
|
|
|
|
LL | while (if let Some(_value) = droppy().get() { false } else { true }) {
|
|
| ^^^^^^^^^^^^^^^^^^^--------^^^^^^
|
|
| |
|
|
| this value has a significant drop implementation which may observe a major change in drop order and requires your discretion
|
|
|
|
|
= 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
|
|
--> $DIR/lint-if-let-rescope.rs:91:57
|
|
|
|
|
LL | while (if let Some(_value) = droppy().get() { false } else { true }) {
|
|
| ^
|
|
help: a `match` with a single arm can preserve the drop order up to Edition 2021
|
|
|
|
|
LL | while (match droppy().get() { Some(_value) => { false } _ => { true }}) {
|
|
| ~~~~~ +++++++++++++++++ ~~~~ +
|
|
|
|
error: aborting due to 8 previous errors
|
|
|