1
1
error: 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
3
3
|
4
4
LL | let Foo(mut a) = &Foo(0);
5
5
| -^^^^^^^^^
6
6
| |
7
7
| help: desugar the match ergonomics: `&`
8
8
|
9
9
note: the lint level is defined here
10
- --> $DIR/match_ergonomics_2024.rs:5:11
10
+ --> $DIR/match_ergonomics_2024.rs:7:9
11
11
|
12
- LL | #![forbid (rust_2024_incompatible_pat)]
13
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^
12
+ LL | #![deny (rust_2024_incompatible_pat)]
13
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
14
14
15
15
error: 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
17
17
|
18
18
LL | let Foo(mut a) = &mut Foo(0);
19
19
| -^^^^^^^^^
20
20
| |
21
21
| help: desugar the match ergonomics: `&mut`
22
22
23
23
error: 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
25
25
|
26
26
LL | if let Some(&_) = &&&&&Some(&0u8) {}
27
27
| -^^^^^^^
28
28
| |
29
29
| help: desugar the match ergonomics: `&&&&&`
30
30
31
31
error: 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
33
33
|
34
34
LL | if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
35
35
| -^^^^^^^^^^^
36
36
| |
37
37
| help: desugar the match ergonomics: `&&&&&`
38
38
39
39
error: 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
41
41
|
42
42
LL | if let Some(&_) = &&&&&mut Some(&0u8) {}
43
43
| -^^^^^^^
44
44
| |
45
45
| help: desugar the match ergonomics: `&&&&&mut`
46
46
47
47
error: 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
49
49
|
50
50
LL | if let Some(&mut Some(Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
51
51
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -56,7 +56,7 @@ LL | if let &mut Some(&mut Some(&mut Some(_))) = &mut Some(&mut Some(&mut So
56
56
| ++++ ++++
57
57
58
58
error: 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
60
60
|
61
61
LL | if let Some(&mut Some(Some(_a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
62
62
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -67,7 +67,7 @@ LL | if let &mut Some(&mut Some(&mut Some(ref mut _a))) = &mut Some(&mut Som
67
67
| ++++ ++++ +++++++
68
68
69
69
error: 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
71
71
|
72
72
LL | let Struct { a, mut b, c } = &s;
73
73
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -77,5 +77,21 @@ help: desugar the match ergonomics
77
77
LL | let &Struct { ref a, mut b, ref c } = &s;
78
78
| + +++ +++
79
79
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
81
97
0 commit comments