Skip to content

Commit b8615aa

Browse files
committed
Move existing rfc3627 tests to a dedicated folder
1 parent 1a5a224 commit b8615aa

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

tests/ui/pattern/match_ergonomics_2024.fixed renamed to tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//@ edition: 2021
22
//@ run-rustfix
33
//@ rustfix-only-machine-applicable
4-
//@ aux-build:match_ergonomics_2024_macros.rs
4+
//@ aux-build:migration_lint_macros.rs
55
#![feature(mut_ref, ref_pat_eat_one_layer_2024)]
66
#![allow(incomplete_features, unused)]
77
#![deny(rust_2024_incompatible_pat)]
88

9-
extern crate match_ergonomics_2024_macros;
9+
extern crate migration_lint_macros;
1010

1111
struct Foo(u8);
1212

@@ -47,7 +47,7 @@ fn main() {
4747
match &(Some(0), Some(0)) {
4848
// The two patterns are the same syntactically, but because they're defined in different
4949
// editions they don't mean the same thing.
50-
(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
50+
(Some(mut _x), migration_lint_macros::mixed_edition_pat!(_y)) => {
5151
//~^ WARN: the semantics of this pattern will change in edition 2024
5252
_x = 4;
5353
_y = &7;

tests/ui/pattern/match_ergonomics_2024.rs renamed to tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//@ edition: 2021
22
//@ run-rustfix
33
//@ rustfix-only-machine-applicable
4-
//@ aux-build:match_ergonomics_2024_macros.rs
4+
//@ aux-build:migration_lint_macros.rs
55
#![feature(mut_ref, ref_pat_eat_one_layer_2024)]
66
#![allow(incomplete_features, unused)]
77
#![deny(rust_2024_incompatible_pat)]
88

9-
extern crate match_ergonomics_2024_macros;
9+
extern crate migration_lint_macros;
1010

1111
struct Foo(u8);
1212

@@ -47,7 +47,7 @@ fn main() {
4747
match &(Some(0), Some(0)) {
4848
// The two patterns are the same syntactically, but because they're defined in different
4949
// editions they don't mean the same thing.
50-
(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
50+
(Some(mut _x), migration_lint_macros::mixed_edition_pat!(_y)) => {
5151
//~^ WARN: the semantics of this pattern will change in edition 2024
5252
_x = 4;
5353
_y = &7;
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,51 @@
11
error: the semantics of this pattern will change in edition 2024
2-
--> $DIR/match_ergonomics_2024.rs:14:9
2+
--> $DIR/migration_lint.rs:14:9
33
|
44
LL | let Foo(mut a) = &Foo(0);
55
| -^^^^^^^^^
66
| |
77
| help: desugar the match ergonomics: `&`
88
|
99
note: the lint level is defined here
10-
--> $DIR/match_ergonomics_2024.rs:7:9
10+
--> $DIR/migration_lint.rs:7:9
1111
|
1212
LL | #![deny(rust_2024_incompatible_pat)]
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error: the semantics of this pattern will change in edition 2024
16-
--> $DIR/match_ergonomics_2024.rs:18:9
16+
--> $DIR/migration_lint.rs:18:9
1717
|
1818
LL | let Foo(mut a) = &mut Foo(0);
1919
| -^^^^^^^^^
2020
| |
2121
| help: desugar the match ergonomics: `&mut`
2222

2323
error: the semantics of this pattern will change in edition 2024
24-
--> $DIR/match_ergonomics_2024.rs:22:12
24+
--> $DIR/migration_lint.rs:22:12
2525
|
2626
LL | if let Some(&_) = &&&&&Some(&0u8) {}
2727
| -^^^^^^^
2828
| |
2929
| help: desugar the match ergonomics: `&&&&&`
3030

3131
error: the semantics of this pattern will change in edition 2024
32-
--> $DIR/match_ergonomics_2024.rs:25:12
32+
--> $DIR/migration_lint.rs:25:12
3333
|
3434
LL | if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
3535
| -^^^^^^^^^^^
3636
| |
3737
| help: desugar the match ergonomics: `&&&&&`
3838

3939
error: the semantics of this pattern will change in edition 2024
40-
--> $DIR/match_ergonomics_2024.rs:28:12
40+
--> $DIR/migration_lint.rs:28:12
4141
|
4242
LL | if let Some(&_) = &&&&&mut Some(&0u8) {}
4343
| -^^^^^^^
4444
| |
4545
| help: desugar the match ergonomics: `&&&&&mut`
4646

4747
error: the semantics of this pattern will change in edition 2024
48-
--> $DIR/match_ergonomics_2024.rs:31:12
48+
--> $DIR/migration_lint.rs:31:12
4949
|
5050
LL | 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

5858
error: the semantics of this pattern will change in edition 2024
59-
--> $DIR/match_ergonomics_2024.rs:34:12
59+
--> $DIR/migration_lint.rs:34:12
6060
|
6161
LL | 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

6969
error: the semantics of this pattern will change in edition 2024
70-
--> $DIR/match_ergonomics_2024.rs:43:9
70+
--> $DIR/migration_lint.rs:43:9
7171
|
7272
LL | let Struct { a, mut b, c } = &s;
7373
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -78,20 +78,20 @@ LL | let &Struct { ref a, mut b, ref c } = &s;
7878
| + +++ +++
7979

8080
warning: the semantics of this pattern will change in edition 2024
81-
--> $DIR/match_ergonomics_2024.rs:50:9
81+
--> $DIR/migration_lint.rs:50:9
8282
|
83-
LL | (Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => {
84-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
83+
LL | (Some(mut _x), migration_lint_macros::mixed_edition_pat!(_y)) => {
84+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8585
|
8686
note: the lint level is defined here
87-
--> $DIR/match_ergonomics_2024.rs:46:12
87+
--> $DIR/migration_lint.rs:46:12
8888
|
8989
LL | #[warn(rust_2024_incompatible_pat)]
9090
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
9191
help: desugar the match ergonomics
9292
|
93-
LL | &(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(ref _y)) => {
94-
| + +++
93+
LL | &(Some(mut _x), migration_lint_macros::mixed_edition_pat!(ref _y)) => {
94+
| + +++
9595

9696
error: aborting due to 8 previous errors; 1 warning emitted
9797

0 commit comments

Comments
 (0)