about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2024-10-08 00:14:35 +0200
committerNadrieril <nadrieril+git@gmail.com>2024-10-08 00:23:28 +0200
commit2ef0a8fdfd5142e8a524f4dc9fff8c65d0bd7cc2 (patch)
treee749cf28ef98ab0807569e3b2040f112b8ebee25 /tests
parent4aaada42d0b59c3294908f9996277c60d9e13917 (diff)
downloadrust-2ef0a8fdfd5142e8a524f4dc9fff8c65d0bd7cc2.tar.gz
rust-2ef0a8fdfd5142e8a524f4dc9fff8c65d0bd7cc2.zip
Change error message
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed30
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs30
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr32
-rw-r--r--tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr14
4 files changed, 53 insertions, 53 deletions
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed
index 90c35b5a697..086671e69cb 100644
--- a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.fixed
@@ -23,22 +23,22 @@ fn main() {
     assert_type_eq(x, &mut 0u8);
 
     let &Foo(mut x) = &Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let &mut Foo(mut x) = &mut Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let &Foo(ref x) = &Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, &0u8);
 
     let &mut Foo(ref x) = &mut Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, &0u8);
 
@@ -55,22 +55,22 @@ fn main() {
     assert_type_eq(x, &0u8);
 
     let &Foo(&x) = &Foo(&0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let &Foo(&mut x) = &Foo(&mut 0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let &mut Foo(&x) = &mut Foo(&0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let &mut Foo(&mut x) = &mut Foo(&mut 0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
@@ -79,25 +79,25 @@ fn main() {
     }
 
     if let &&&&&Some(&x) = &&&&&Some(&0u8) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, 0u8);
     }
 
     if let &&&&&Some(&mut x) = &&&&&Some(&mut 0u8) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, 0u8);
     }
 
     if let &&&&&mut Some(&x) = &&&&&mut Some(&0u8) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, 0u8);
     }
 
     if let &mut Some(&mut Some(&mut Some(ref mut x))) = &mut Some(&mut Some(&mut Some(0u8))) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, &mut 0u8);
     }
@@ -109,20 +109,20 @@ fn main() {
     }
 
     let &Struct { ref a, mut b, ref c } = &Struct { a: 0, b: 0, c: 0 };
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(a, &0u32);
     assert_type_eq(b, 0u32);
 
     let &Struct { a: &a, ref b, ref c } = &Struct { a: &0, b: &0, c: &0 };
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(a, 0u32);
     assert_type_eq(b, &&0u32);
     assert_type_eq(c, &&0u32);
 
     if let &Struct { a: &Some(a), b: &Some(&b), c: &Some(ref c) } =
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         &(Struct { a: &Some(&0), b: &Some(&0), c: &Some(&0) })
     {
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs
index 04d547f3018..acceafdb7ec 100644
--- a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.rs
@@ -23,22 +23,22 @@ fn main() {
     assert_type_eq(x, &mut 0u8);
 
     let Foo(mut x) = &Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let Foo(mut x) = &mut Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let Foo(ref x) = &Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, &0u8);
 
     let Foo(ref x) = &mut Foo(0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, &0u8);
 
@@ -55,22 +55,22 @@ fn main() {
     assert_type_eq(x, &0u8);
 
     let Foo(&x) = &Foo(&0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let Foo(&mut x) = &Foo(&mut 0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let Foo(&x) = &mut Foo(&0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
     let Foo(&mut x) = &mut Foo(&mut 0);
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(x, 0u8);
 
@@ -79,25 +79,25 @@ fn main() {
     }
 
     if let Some(&x) = &&&&&Some(&0u8) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, 0u8);
     }
 
     if let Some(&mut x) = &&&&&Some(&mut 0u8) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, 0u8);
     }
 
     if let Some(&x) = &&&&&mut Some(&0u8) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, 0u8);
     }
 
     if let Some(&mut Some(Some(x))) = &mut Some(&mut Some(&mut Some(0u8))) {
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         assert_type_eq(x, &mut 0u8);
     }
@@ -109,20 +109,20 @@ fn main() {
     }
 
     let Struct { a, mut b, c } = &Struct { a: 0, b: 0, c: 0 };
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(a, &0u32);
     assert_type_eq(b, 0u32);
 
     let Struct { a: &a, b, ref c } = &Struct { a: &0, b: &0, c: &0 };
-    //~^ ERROR: the semantics of this pattern will change in edition 2024
+    //~^ ERROR: patterns are not allowed to reset the default binding mode
     //~| WARN: this changes meaning in Rust 2024
     assert_type_eq(a, 0u32);
     assert_type_eq(b, &&0u32);
     assert_type_eq(c, &&0u32);
 
     if let Struct { a: &Some(a), b: Some(&b), c: Some(c) } =
-        //~^ ERROR: the semantics of this pattern will change in edition 2024
+        //~^ ERROR: patterns are not allowed to reset the default binding mode
         //~| WARN: this changes meaning in Rust 2024
         &(Struct { a: &Some(&0), b: &Some(&0), c: &Some(&0) })
     {
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr
index 4881748f71a..1c9a469e6ee 100644
--- a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/migration_lint.stderr
@@ -1,4 +1,4 @@
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:25:9
    |
 LL |     let Foo(mut x) = &Foo(0);
@@ -14,7 +14,7 @@ note: the lint level is defined here
 LL | #![deny(rust_2024_incompatible_pat)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:30:9
    |
 LL |     let Foo(mut x) = &mut Foo(0);
@@ -25,7 +25,7 @@ LL |     let Foo(mut x) = &mut Foo(0);
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:35:9
    |
 LL |     let Foo(ref x) = &Foo(0);
@@ -36,7 +36,7 @@ LL |     let Foo(ref x) = &Foo(0);
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:40:9
    |
 LL |     let Foo(ref x) = &mut Foo(0);
@@ -47,7 +47,7 @@ LL |     let Foo(ref x) = &mut Foo(0);
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:57:9
    |
 LL |     let Foo(&x) = &Foo(&0);
@@ -58,7 +58,7 @@ LL |     let Foo(&x) = &Foo(&0);
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:62:9
    |
 LL |     let Foo(&mut x) = &Foo(&mut 0);
@@ -69,7 +69,7 @@ LL |     let Foo(&mut x) = &Foo(&mut 0);
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:67:9
    |
 LL |     let Foo(&x) = &mut Foo(&0);
@@ -80,7 +80,7 @@ LL |     let Foo(&x) = &mut Foo(&0);
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:72:9
    |
 LL |     let Foo(&mut x) = &mut Foo(&mut 0);
@@ -91,7 +91,7 @@ LL |     let Foo(&mut x) = &mut Foo(&mut 0);
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:81:12
    |
 LL |     if let Some(&x) = &&&&&Some(&0u8) {
@@ -102,7 +102,7 @@ LL |     if let Some(&x) = &&&&&Some(&0u8) {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:87:12
    |
 LL |     if let Some(&mut x) = &&&&&Some(&mut 0u8) {
@@ -113,7 +113,7 @@ LL |     if let Some(&mut x) = &&&&&Some(&mut 0u8) {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:93:12
    |
 LL |     if let Some(&x) = &&&&&mut Some(&0u8) {
@@ -124,7 +124,7 @@ LL |     if let Some(&x) = &&&&&mut Some(&0u8) {
    = warning: this changes meaning in Rust 2024
    = note: for more information, see 123076
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:99:12
    |
 LL |     if let Some(&mut Some(Some(x))) = &mut Some(&mut Some(&mut Some(0u8))) {
@@ -137,7 +137,7 @@ help: desugar the match ergonomics
 LL |     if let &mut Some(&mut Some(&mut Some(ref mut x))) = &mut Some(&mut Some(&mut Some(0u8))) {
    |            ++++                ++++      +++++++
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:111:9
    |
 LL |     let Struct { a, mut b, c } = &Struct { a: 0, b: 0, c: 0 };
@@ -150,7 +150,7 @@ help: desugar the match ergonomics
 LL |     let &Struct { ref a, mut b, ref c } = &Struct { a: 0, b: 0, c: 0 };
    |         +         +++           +++
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:117:9
    |
 LL |     let Struct { a: &a, b, ref c } = &Struct { a: &0, b: &0, c: &0 };
@@ -163,7 +163,7 @@ help: desugar the match ergonomics
 LL |     let &Struct { a: &a, ref b, ref c } = &Struct { a: &0, b: &0, c: &0 };
    |         +                +++
 
-error: the semantics of this pattern will change in edition 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:124:12
    |
 LL |     if let Struct { a: &Some(a), b: Some(&b), c: Some(c) } =
@@ -176,7 +176,7 @@ help: desugar the match ergonomics
 LL |     if let &Struct { a: &Some(a), b: &Some(&b), c: &Some(ref c) } =
    |            +                         +             +     +++
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/migration_lint.rs:137:9
    |
 LL |         (Some(mut x), migration_lint_macros::mixed_edition_pat!(y)) => {
diff --git a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr
index ca34ad8d0ec..33e4f0021b7 100644
--- a/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr
+++ b/tests/ui/pattern/rfc-3627-match-ergonomics-2024/min_match_ergonomics_fail.stderr
@@ -99,7 +99,7 @@ LL - test_pat_on_type![Foo { f: (&x,) }: &mut Foo];
 LL + test_pat_on_type![Foo { f: (x,) }: &mut Foo];
    |
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/min_match_ergonomics_fail.rs:25:19
    |
 LL | test_pat_on_type![(&x,): &(&T,)];
@@ -107,7 +107,7 @@ LL | test_pat_on_type![(&x,): &(&T,)];
    |                   |
    |                   help: desugar the match ergonomics: `&`
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/min_match_ergonomics_fail.rs:28:19
    |
 LL | test_pat_on_type![(&mut x,): &(&mut T,)];
@@ -115,7 +115,7 @@ LL | test_pat_on_type![(&mut x,): &(&mut T,)];
    |                   |
    |                   help: desugar the match ergonomics: `&`
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/min_match_ergonomics_fail.rs:32:19
    |
 LL | test_pat_on_type![Foo { f: &(x,) }: &Foo];
@@ -123,7 +123,7 @@ LL | test_pat_on_type![Foo { f: &(x,) }: &Foo];
    |                   |
    |                   help: desugar the match ergonomics: `&`
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/min_match_ergonomics_fail.rs:33:19
    |
 LL | test_pat_on_type![(mut x,): &(T,)];
@@ -131,7 +131,7 @@ LL | test_pat_on_type![(mut x,): &(T,)];
    |                   |
    |                   help: desugar the match ergonomics: `&`
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/min_match_ergonomics_fail.rs:34:19
    |
 LL | test_pat_on_type![(ref x,): &(T,)];
@@ -139,7 +139,7 @@ LL | test_pat_on_type![(ref x,): &(T,)];
    |                   |
    |                   help: desugar the match ergonomics: `&`
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/min_match_ergonomics_fail.rs:35:19
    |
 LL | test_pat_on_type![(ref mut x,): &mut (T,)];
@@ -147,7 +147,7 @@ LL | test_pat_on_type![(ref mut x,): &mut (T,)];
    |                   |
    |                   help: desugar the match ergonomics: `&mut`
 
-error: patterns are not allowed to reset the default binding mode in rust 2024
+error: patterns are not allowed to reset the default binding mode in edition 2024
   --> $DIR/min_match_ergonomics_fail.rs:44:9
    |
 LL |         (&x,) => x,