1
Fork 0

Move existing rfc3627 tests to a dedicated folder

This commit is contained in:
Nadrieril 2024-09-24 11:32:33 +02:00
parent 1a5a2240bc
commit b8615aa3f5
4 changed files with 21 additions and 21 deletions

View file

@ -1,12 +1,12 @@
//@ edition: 2021 //@ edition: 2021
//@ run-rustfix //@ run-rustfix
//@ rustfix-only-machine-applicable //@ rustfix-only-machine-applicable
//@ aux-build:match_ergonomics_2024_macros.rs //@ aux-build:migration_lint_macros.rs
#![feature(mut_ref, ref_pat_eat_one_layer_2024)] #![feature(mut_ref, ref_pat_eat_one_layer_2024)]
#![allow(incomplete_features, unused)] #![allow(incomplete_features, unused)]
#![deny(rust_2024_incompatible_pat)] #![deny(rust_2024_incompatible_pat)]
extern crate match_ergonomics_2024_macros; extern crate migration_lint_macros;
struct Foo(u8); struct Foo(u8);
@ -47,7 +47,7 @@ fn main() {
match &(Some(0), Some(0)) { match &(Some(0), Some(0)) {
// The two patterns are the same syntactically, but because they're defined in different // The two patterns are the same syntactically, but because they're defined in different
// editions they don't mean the same thing. // editions they don't mean the same thing.
(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => { (Some(mut _x), migration_lint_macros::mixed_edition_pat!(_y)) => {
//~^ WARN: the semantics of this pattern will change in edition 2024 //~^ WARN: the semantics of this pattern will change in edition 2024
_x = 4; _x = 4;
_y = &7; _y = &7;

View file

@ -1,12 +1,12 @@
//@ edition: 2021 //@ edition: 2021
//@ run-rustfix //@ run-rustfix
//@ rustfix-only-machine-applicable //@ rustfix-only-machine-applicable
//@ aux-build:match_ergonomics_2024_macros.rs //@ aux-build:migration_lint_macros.rs
#![feature(mut_ref, ref_pat_eat_one_layer_2024)] #![feature(mut_ref, ref_pat_eat_one_layer_2024)]
#![allow(incomplete_features, unused)] #![allow(incomplete_features, unused)]
#![deny(rust_2024_incompatible_pat)] #![deny(rust_2024_incompatible_pat)]
extern crate match_ergonomics_2024_macros; extern crate migration_lint_macros;
struct Foo(u8); struct Foo(u8);
@ -47,7 +47,7 @@ fn main() {
match &(Some(0), Some(0)) { match &(Some(0), Some(0)) {
// The two patterns are the same syntactically, but because they're defined in different // The two patterns are the same syntactically, but because they're defined in different
// editions they don't mean the same thing. // editions they don't mean the same thing.
(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => { (Some(mut _x), migration_lint_macros::mixed_edition_pat!(_y)) => {
//~^ WARN: the semantics of this pattern will change in edition 2024 //~^ WARN: the semantics of this pattern will change in edition 2024
_x = 4; _x = 4;
_y = &7; _y = &7;

View file

@ -1,5 +1,5 @@
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:14:9 --> $DIR/migration_lint.rs:14:9
| |
LL | let Foo(mut a) = &Foo(0); LL | let Foo(mut a) = &Foo(0);
| -^^^^^^^^^ | -^^^^^^^^^
@ -7,13 +7,13 @@ LL | let Foo(mut a) = &Foo(0);
| help: desugar the match ergonomics: `&` | help: desugar the match ergonomics: `&`
| |
note: the lint level is defined here note: the lint level is defined here
--> $DIR/match_ergonomics_2024.rs:7:9 --> $DIR/migration_lint.rs:7:9
| |
LL | #![deny(rust_2024_incompatible_pat)] LL | #![deny(rust_2024_incompatible_pat)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:18:9 --> $DIR/migration_lint.rs:18:9
| |
LL | let Foo(mut a) = &mut Foo(0); LL | let Foo(mut a) = &mut Foo(0);
| -^^^^^^^^^ | -^^^^^^^^^
@ -21,7 +21,7 @@ LL | let Foo(mut a) = &mut Foo(0);
| help: desugar the match ergonomics: `&mut` | help: desugar the match ergonomics: `&mut`
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:22:12 --> $DIR/migration_lint.rs:22:12
| |
LL | if let Some(&_) = &&&&&Some(&0u8) {} LL | if let Some(&_) = &&&&&Some(&0u8) {}
| -^^^^^^^ | -^^^^^^^
@ -29,7 +29,7 @@ LL | if let Some(&_) = &&&&&Some(&0u8) {}
| help: desugar the match ergonomics: `&&&&&` | help: desugar the match ergonomics: `&&&&&`
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:25:12 --> $DIR/migration_lint.rs:25:12
| |
LL | if let Some(&mut _) = &&&&&Some(&mut 0u8) {} LL | if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
| -^^^^^^^^^^^ | -^^^^^^^^^^^
@ -37,7 +37,7 @@ LL | if let Some(&mut _) = &&&&&Some(&mut 0u8) {}
| help: desugar the match ergonomics: `&&&&&` | help: desugar the match ergonomics: `&&&&&`
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:28:12 --> $DIR/migration_lint.rs:28:12
| |
LL | if let Some(&_) = &&&&&mut Some(&0u8) {} LL | if let Some(&_) = &&&&&mut Some(&0u8) {}
| -^^^^^^^ | -^^^^^^^
@ -45,7 +45,7 @@ LL | if let Some(&_) = &&&&&mut Some(&0u8) {}
| help: desugar the match ergonomics: `&&&&&mut` | help: desugar the match ergonomics: `&&&&&mut`
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:31:12 --> $DIR/migration_lint.rs:31:12
| |
LL | if let Some(&mut Some(Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {} LL | if let Some(&mut Some(Some(_))) = &mut Some(&mut Some(&mut Some(0u8))) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^
@ -56,7 +56,7 @@ LL | if let &mut Some(&mut Some(&mut Some(_))) = &mut Some(&mut Some(&mut So
| ++++ ++++ | ++++ ++++
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:34:12 --> $DIR/migration_lint.rs:34:12
| |
LL | if let Some(&mut Some(Some(_a))) = &mut Some(&mut Some(&mut Some(0u8))) {} LL | if let Some(&mut Some(Some(_a))) = &mut Some(&mut Some(&mut Some(0u8))) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^
@ -67,7 +67,7 @@ LL | if let &mut Some(&mut Some(&mut Some(ref mut _a))) = &mut Some(&mut Som
| ++++ ++++ +++++++ | ++++ ++++ +++++++
error: the semantics of this pattern will change in edition 2024 error: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:43:9 --> $DIR/migration_lint.rs:43:9
| |
LL | let Struct { a, mut b, c } = &s; LL | let Struct { a, mut b, c } = &s;
| ^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^
@ -78,20 +78,20 @@ LL | let &Struct { ref a, mut b, ref c } = &s;
| + +++ +++ | + +++ +++
warning: the semantics of this pattern will change in edition 2024 warning: the semantics of this pattern will change in edition 2024
--> $DIR/match_ergonomics_2024.rs:50:9 --> $DIR/migration_lint.rs:50:9
| |
LL | (Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(_y)) => { LL | (Some(mut _x), migration_lint_macros::mixed_edition_pat!(_y)) => {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
note: the lint level is defined here note: the lint level is defined here
--> $DIR/match_ergonomics_2024.rs:46:12 --> $DIR/migration_lint.rs:46:12
| |
LL | #[warn(rust_2024_incompatible_pat)] LL | #[warn(rust_2024_incompatible_pat)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
help: desugar the match ergonomics help: desugar the match ergonomics
| |
LL | &(Some(mut _x), match_ergonomics_2024_macros::mixed_edition_pat!(ref _y)) => { LL | &(Some(mut _x), migration_lint_macros::mixed_edition_pat!(ref _y)) => {
| + +++ | + +++
error: aborting due to 8 previous errors; 1 warning emitted error: aborting due to 8 previous errors; 1 warning emitted