mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
9d92a7f355
Unfortunately, we can't always offer a machine-applicable suggestion when there are subpatterns from macro expansion. Co-Authored-By: Guillaume Boisseau <Nadrieril@users.noreply.github.com>
98 lines
3.3 KiB
Plaintext
98 lines
3.3 KiB
Plaintext
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:14:9
|
|
|
|
|
LL | let Foo(mut a) = &Foo(0);
|
|
| -^^^^^^^^^
|
|
| |
|
|
| help: desugar the match ergonomics: `&`
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/match_ergonomics_2024.rs:7:9
|
|
|
|
|
LL | #![deny(rust_2024_incompatible_pat)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:18:9
|
|
|
|
|
LL | let Foo(mut a) = &mut Foo(0);
|
|
| -^^^^^^^^^
|
|
| |
|
|
| help: desugar the match ergonomics: `&mut`
|
|
|
|
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:22:12
|
|
|
|
|
LL | if let Some(&_) = &&&&&Some(&0u8) {}
|
|
| -^^^^^^^
|
|
| |
|
|
| help: desugar the match ergonomics: `&&&&&`
|
|
|
|
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:25:12
|
|
|
|
|
LL | if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
|
|
| -^^^^^^^^^^^
|
|
| |
|
|
| help: desugar the match ergonomics: `&&&&&`
|
|
|
|
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:28:12
|
|
|
|
|
LL | if let Some(&_) = &&&&&mut Some(&0u8) {}
|
|
| -^^^^^^^
|
|
| |
|
|
| help: desugar the match ergonomics: `&&&&&mut`
|
|
|
|
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:31:12
|
|
|
|
|
LL | if let Some(&mut Some(Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: desugar the match ergonomics
|
|
|
|
|
LL | if let &mut Some(&mut Some(&mut Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
|
|
| ++++ ++++
|
|
|
|
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:34:12
|
|
|
|
|
LL | if let Some(&mut Some(Some(_a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: desugar the match ergonomics
|
|
|
|
|
LL | if let &mut Some(&mut Some(&mut Some(ref mut _a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
|
|
| ++++ ++++ +++++++
|
|
|
|
error: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:43:9
|
|
|
|
|
LL | let Struct { a, mut b, c } = &s;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: desugar the match ergonomics
|
|
|
|
|
LL | let &Struct { ref a, mut b, ref c } = &s;
|
|
| + +++ +++
|
|
|
|
warning: the semantics of this pattern will change in edition 2024
|
|
--> $DIR/match_ergonomics_2024.rs:50:9
|
|
|
|
|
LL | (Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/match_ergonomics_2024.rs:46:12
|
|
|
|
|
LL | #[warn(rust_2024_incompatible_pat)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
help: desugar the match ergonomics
|
|
|
|
|
LL | &(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(ref _y)) => {
|
|
| + +++
|
|
|
|
error: aborting due to 8 previous errors; 1 warning emitted
|
|
|