about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec/suggest-array-length.fixed
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2025-01-07 17:57:53 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2025-01-07 17:57:53 +0200
commite103ab16084dc735b8db6b90186cd7b6967402ee (patch)
treef2f3317a4a2031c7cc1a141c5703166e6fa1d107 /tests/ui/array-slice-vec/suggest-array-length.fixed
parentaa1ef0a432100170d07b89f487e18fc2673c40ba (diff)
parentfb546ee09b226bc4dd4b712d35a372d923c4fa54 (diff)
downloadrust-e103ab16084dc735b8db6b90186cd7b6967402ee.tar.gz
rust-e103ab16084dc735b8db6b90186cd7b6967402ee.zip
Merge from rust-lang/rust
Diffstat (limited to 'tests/ui/array-slice-vec/suggest-array-length.fixed')
-rw-r--r--tests/ui/array-slice-vec/suggest-array-length.fixed25
1 files changed, 11 insertions, 14 deletions
diff --git a/tests/ui/array-slice-vec/suggest-array-length.fixed b/tests/ui/array-slice-vec/suggest-array-length.fixed
index 29f85da56e5..2eacc2517d3 100644
--- a/tests/ui/array-slice-vec/suggest-array-length.fixed
+++ b/tests/ui/array-slice-vec/suggest-array-length.fixed
@@ -3,24 +3,21 @@
 
 fn main() {
     const Foo: [i32; 3] = [1, 2, 3];
-    //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
-    //~| ERROR using `_` for array lengths is unstable
+    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
     const REF_FOO: &[u8; 1] = &[1];
-    //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
-    //~| ERROR using `_` for array lengths is unstable
+    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants
+    static Statik: [i32; 3] = [1, 2, 3];
+    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
+    static REF_STATIK: &[u8; 1] = &[1];
+    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
     let foo: [i32; 3] = [1, 2, 3];
-    //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
-    //~| ERROR using `_` for array lengths is unstable
+    //~^ ERROR using `_` for array lengths is unstable
     let bar: [i32; 3] = [0; 3];
-    //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
-    //~| ERROR using `_` for array lengths is unstable
+    //~^ ERROR using `_` for array lengths is unstable
     let ref_foo: &[i32; 3] = &[1, 2, 3];
-    //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
-    //~| ERROR using `_` for array lengths is unstable
+    //~^ ERROR using `_` for array lengths is unstable
     let ref_bar: &[i32; 3] = &[0; 3];
-    //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
-    //~| ERROR using `_` for array lengths is unstable
+    //~^ ERROR using `_` for array lengths is unstable
     let multiple_ref_foo: &&[i32; 3] = &&[1, 2, 3];
-    //~^ ERROR in expressions, `_` can only be used on the left-hand side of an assignment
-    //~| ERROR using `_` for array lengths is unstable
+    //~^ ERROR using `_` for array lengths is unstable
 }