diff options
| author | Michael Goulet <michael@errs.io> | 2025-01-02 18:49:43 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-01-02 23:39:16 +0000 |
| commit | 6885ff4a7b40f7550fd27c405c7f4ea3768bddb6 (patch) | |
| tree | 086afc694f78ff9067d6937ea7c3b376b1219f4a /tests/ui/array-slice-vec/suggest-array-length.fixed | |
| parent | b85a91fc598117ab23eb5dd294ed3371bc7081d9 (diff) | |
| download | rust-6885ff4a7b40f7550fd27c405c7f4ea3768bddb6.tar.gz rust-6885ff4a7b40f7550fd27c405c7f4ea3768bddb6.zip | |
Unconditionally lower generic_arg_infer
Diffstat (limited to 'tests/ui/array-slice-vec/suggest-array-length.fixed')
| -rw-r--r-- | tests/ui/array-slice-vec/suggest-array-length.fixed | 25 |
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 } |
