diff options
| author | Laurențiu Nicola <lnicola@users.noreply.github.com> | 2025-01-07 16:13:25 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-07 16:13:25 +0000 |
| commit | fd1e95538fa3b3ca87fc4f7df5e9abd918949536 (patch) | |
| tree | f2f3317a4a2031c7cc1a141c5703166e6fa1d107 /tests/ui/array-slice-vec/suggest-array-length.fixed | |
| parent | 8e4409cce3e4a7f7eb974462c943e717db818ed8 (diff) | |
| parent | e103ab16084dc735b8db6b90186cd7b6967402ee (diff) | |
| download | rust-fd1e95538fa3b3ca87fc4f7df5e9abd918949536.tar.gz rust-fd1e95538fa3b3ca87fc4f7df5e9abd918949536.zip | |
Merge pull request #18874 from lnicola/sync-from-rust
minor: Sync from downstream
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 } |
