From b8615aa3f5cde84aa7277e549c2a30fa5e4ac5d5 Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 24 Sep 2024 11:32:33 +0200 Subject: [PATCH] Move existing rfc3627 tests to a dedicated folder --- .../auxiliary/migration_lint_macros.rs} | 0 .../migration_lint.fixed} | 6 ++-- .../migration_lint.rs} | 6 ++-- .../migration_lint.stderr} | 30 +++++++++---------- 4 files changed, 21 insertions(+), 21 deletions(-) rename tests/ui/pattern/{auxiliary/match_ergonomics_2024_macros.rs => rfc-3627-match-ergonomics-2024/auxiliary/migration_lint_macros.rs} (100%) rename tests/ui/pattern/{match_ergonomics_2024.fixed => rfc-3627-match-ergonomics-2024/migration_lint.fixed} (91%) rename tests/ui/pattern/{match_ergonomics_2024.rs => rfc-3627-match-ergonomics-2024/migration_lint.rs} (91%) rename tests/ui/pattern/{match_ergonomics_2024.stderr => rfc-3627-match-ergonomics-2024/migration_lint.stderr} (80%) diff --git a/tests/ui/pattern/auxiliary/match_ergonomics_2024_macros.rs b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/auxiliary/migration_lint_macros.rs similarity index 100% rename from tests/ui/pattern/auxiliary/match_ergonomics_2024_macros.rs rename to tests/ui/pattern/rfc-3627-match-ergonomics-2024/auxiliary/migration_lint_macros.rs diff --git a/tests/ui/pattern/match_ergonomics_2024.fixed b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed similarity index 91% rename from tests/ui/pattern/match_ergonomics_2024.fixed rename to tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed index 1ec2b5a214b..253c9589a55 100644 --- a/tests/ui/pattern/match_ergonomics_2024.fixed +++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed @@ -1,12 +1,12 @@ //@ edition: 2021 //@ run-rustfix //@ 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)] #![allow(incomplete_features, unused)] #![deny(rust_2024_incompatible_pat)] -extern crate match_ergonomics_2024_macros; +extern crate migration_lint_macros; struct Foo(u8); @@ -47,7 +47,7 @@ fn main() { match &(Some(0), Some(0)) { // The two patterns are the same syntactically, but because they're defined in different // 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 _x = 4; _y = &7; diff --git a/tests/ui/pattern/match_ergonomics_2024.rs b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs similarity index 91% rename from tests/ui/pattern/match_ergonomics_2024.rs rename to tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs index c9f992c12d4..1406db779cc 100644 --- a/tests/ui/pattern/match_ergonomics_2024.rs +++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs @@ -1,12 +1,12 @@ //@ edition: 2021 //@ run-rustfix //@ 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)] #![allow(incomplete_features, unused)] #![deny(rust_2024_incompatible_pat)] -extern crate match_ergonomics_2024_macros; +extern crate migration_lint_macros; struct Foo(u8); @@ -47,7 +47,7 @@ struct Struct { match &(Some(0), Some(0)) { // The two patterns are the same syntactically, but because they're defined in different // 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 _x = 4; _y = &7; diff --git a/tests/ui/pattern/match_ergonomics_2024.stderr b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr similarity index 80% rename from tests/ui/pattern/match_ergonomics_2024.stderr rename to tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr index 11844434ad2..4d723012024 100644 --- a/tests/ui/pattern/match_ergonomics_2024.stderr +++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr @@ -1,5 +1,5 @@ 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); | -^^^^^^^^^ @@ -7,13 +7,13 @@ 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 + --> $DIR/migration_lint.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 + --> $DIR/migration_lint.rs:18:9 | 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` 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) {} | -^^^^^^^ @@ -29,7 +29,7 @@ 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 + --> $DIR/migration_lint.rs:25:12 | 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: `&&&&&` 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) {} | -^^^^^^^ @@ -45,7 +45,7 @@ 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 + --> $DIR/migration_lint.rs:31:12 | 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 - --> $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))) {} | ^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -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 - --> $DIR/match_ergonomics_2024.rs:43:9 + --> $DIR/migration_lint.rs:43:9 | 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 - --> $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 - --> $DIR/match_ergonomics_2024.rs:46:12 + --> $DIR/migration_lint.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)) => { - | + +++ +LL | &(Some(mut _x), migration_lint_macros::mixed_edition_pat!(ref _y)) => { + | + +++ error: aborting due to 8 previous errors; 1 warning emitted