about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorBastian Kauschke <bastian_kauschke@hotmail.de>2020-03-30 19:34:16 +0200
committerBastian Kauschke <bastian_kauschke@hotmail.de>2020-03-30 19:34:16 +0200
commita3df1db8ee40f8c5dc520a5d0a37adc5a70a15be (patch)
tree216baa0968a882095c9bd11caf89b7aed9d400b8 /src/test/ui/error-codes
parent40c5eefdcde3a8696881643faeb7e2619ea0322f (diff)
update tests, improve variable names
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0730.rs2
-rw-r--r--src/test/ui/error-codes/E0730.stderr11
2 files changed, 5 insertions, 8 deletions
diff --git a/src/test/ui/error-codes/E0730.rs b/src/test/ui/error-codes/E0730.rs
index 45fc7e13d17..66a6e1c817a 100644
--- a/src/test/ui/error-codes/E0730.rs
+++ b/src/test/ui/error-codes/E0730.rs
@@ -3,7 +3,7 @@
 
 fn is_123<const N: usize>(x: [u32; N]) -> bool {
     match x {
-        [1, 2, 3] => true, //~ ERROR mismatched types
+        [1, 2, ..] => true, //~ ERROR cannot pattern-match on an array without a fixed length
         _ => false
     }
 }
diff --git a/src/test/ui/error-codes/E0730.stderr b/src/test/ui/error-codes/E0730.stderr
index 834a3e96870..fb53ae31c0b 100644
--- a/src/test/ui/error-codes/E0730.stderr
+++ b/src/test/ui/error-codes/E0730.stderr
@@ -6,15 +6,12 @@ LL | #![feature(const_generics)]
    |
    = note: `#[warn(incomplete_features)]` on by default
 
-error[E0308]: mismatched types
+error[E0730]: cannot pattern-match on an array without a fixed length
   --> $DIR/E0730.rs:6:9
    |
-LL |         [1, 2, 3] => true,
-   |         ^^^^^^^^^ expected `3usize`, found `N`
-   |
-   = note: expected array `[u32; 3]`
-              found array `[u32; _]`
+LL |         [1, 2, ..] => true,
+   |         ^^^^^^^^^^
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0730`.