11error: the semantics of this pattern will change in edition 2024
2- --> $DIR/match_ergonomics_2024.rs:10 :9
2+ --> $DIR/match_ergonomics_2024.rs:14 :9
33 |
44LL | let Foo(mut a) = &Foo(0);
55 | -^^^^^^^^^
66 | |
77 | help: desugar the match ergonomics: `&`
88 |
99note: the lint level is defined here
10- --> $DIR/match_ergonomics_2024.rs:5:11
10+ --> $DIR/match_ergonomics_2024.rs:7:9
1111 |
12- LL | #![forbid (rust_2024_incompatible_pat)]
13- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
12+ LL | #![deny (rust_2024_incompatible_pat)]
13+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
1414
1515error: the semantics of this pattern will change in edition 2024
16- --> $DIR/match_ergonomics_2024.rs:14 :9
16+ --> $DIR/match_ergonomics_2024.rs:18 :9
1717 |
1818LL | let Foo(mut a) = &mut Foo(0);
1919 | -^^^^^^^^^
2020 | |
2121 | help: desugar the match ergonomics: `&mut`
2222
2323error: the semantics of this pattern will change in edition 2024
24- --> $DIR/match_ergonomics_2024.rs:18 :12
24+ --> $DIR/match_ergonomics_2024.rs:22 :12
2525 |
2626LL | if let Some(&_) = &&&&&Some(&0u8) {}
2727 | -^^^^^^^
2828 | |
2929 | help: desugar the match ergonomics: `&&&&&`
3030
3131error: the semantics of this pattern will change in edition 2024
32- --> $DIR/match_ergonomics_2024.rs:21 :12
32+ --> $DIR/match_ergonomics_2024.rs:25 :12
3333 |
3434LL | if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
3535 | -^^^^^^^^^^^
3636 | |
3737 | help: desugar the match ergonomics: `&&&&&`
3838
3939error: the semantics of this pattern will change in edition 2024
40- --> $DIR/match_ergonomics_2024.rs:24 :12
40+ --> $DIR/match_ergonomics_2024.rs:28 :12
4141 |
4242LL | if let Some(&_) = &&&&&mut Some(&0u8) {}
4343 | -^^^^^^^
4444 | |
4545 | help: desugar the match ergonomics: `&&&&&mut`
4646
4747error: the semantics of this pattern will change in edition 2024
48- --> $DIR/match_ergonomics_2024.rs:27 :12
48+ --> $DIR/match_ergonomics_2024.rs:31 :12
4949 |
5050LL | if let Some(&mut Some(Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
5151 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -56,7 +56,7 @@ LL | if let &mut Some(&mut Some(&mut Some(_))) = &mut Some(&mut Some(&mut So
5656 | ++++ ++++
5757
5858error: the semantics of this pattern will change in edition 2024
59- --> $DIR/match_ergonomics_2024.rs:30 :12
59+ --> $DIR/match_ergonomics_2024.rs:34 :12
6060 |
6161LL | if let Some(&mut Some(Some(_a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
6262 | ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,7 +67,7 @@ LL | if let &mut Some(&mut Some(&mut Some(ref mut _a))) = &mut Some(&mut Som
6767 | ++++ ++++ +++++++
6868
6969error: the semantics of this pattern will change in edition 2024
70- --> $DIR/match_ergonomics_2024.rs:39 :9
70+ --> $DIR/match_ergonomics_2024.rs:43 :9
7171 |
7272LL | let Struct { a, mut b, c } = &s;
7373 | ^^^^^^^^^^^^^^^^^^^^^^
@@ -77,5 +77,21 @@ help: desugar the match ergonomics
7777LL | let &Struct { ref a, mut b, ref c } = &s;
7878 | + +++ +++
7979
80- error: aborting due to 8 previous errors
80+ warning: the semantics of this pattern will change in edition 2024
81+ --> $DIR/match_ergonomics_2024.rs:50:9
82+ |
83+ LL | (Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
84+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85+ |
86+ note: the lint level is defined here
87+ --> $DIR/match_ergonomics_2024.rs:46:12
88+ |
89+ LL | #[warn(rust_2024_incompatible_pat)]
90+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
91+ help: desugar the match ergonomics
92+ |
93+ LL | &(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(ref _y)) => {
94+ | + +++
95+
96+ error: aborting due to 8 previous errors; 1 warning emitted
8197
0 commit comments