about summary refs log tree commit diff
path: root/tests/ui/array-slice-vec/suggest-array-length.fixed
diff options
context:
space:
mode:
authorThe rustc-dev-guide Cronjob Bot <github-actions@github.com>2025-06-19 04:07:39 +0000
committerThe rustc-dev-guide Cronjob Bot <github-actions@github.com>2025-06-19 04:07:39 +0000
commitd854d563445082268ca8e7dd76b6ccde0342c2b3 (patch)
tree59d2cbb81c6cf1bb95feb51963d037fd67fc51bf /tests/ui/array-slice-vec/suggest-array-length.fixed
parent48b36ee8ad3a2dc61e5ed1248621b4371bd1f147 (diff)
parentd1d8e386c5e84c4ba857f56c3291f73c27e2d62a (diff)
downloadrust-d854d563445082268ca8e7dd76b6ccde0342c2b3.tar.gz
rust-d854d563445082268ca8e7dd76b6ccde0342c2b3.zip
Merge from rustc
Diffstat (limited to 'tests/ui/array-slice-vec/suggest-array-length.fixed')
-rw-r--r--tests/ui/array-slice-vec/suggest-array-length.fixed15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/ui/array-slice-vec/suggest-array-length.fixed b/tests/ui/array-slice-vec/suggest-array-length.fixed
index 2eacc2517d3..ae1c6583c23 100644
--- a/tests/ui/array-slice-vec/suggest-array-length.fixed
+++ b/tests/ui/array-slice-vec/suggest-array-length.fixed
@@ -10,14 +10,9 @@ fn main() {
     //~^ 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 using `_` for array lengths is unstable
-    let bar: [i32; 3] = [0; 3];
-    //~^ ERROR using `_` for array lengths is unstable
-    let ref_foo: &[i32; 3] = &[1, 2, 3];
-    //~^ ERROR using `_` for array lengths is unstable
-    let ref_bar: &[i32; 3] = &[0; 3];
-    //~^ ERROR using `_` for array lengths is unstable
-    let multiple_ref_foo: &&[i32; 3] = &&[1, 2, 3];
-    //~^ ERROR using `_` for array lengths is unstable
+    let foo: [i32; _] = [1, 2, 3];
+    let bar: [i32; _] = [0; 3];
+    let ref_foo: &[i32; _] = &[1, 2, 3];
+    let ref_bar: &[i32; _] = &[0; 3];
+    let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
 }