1- error: in expressions, `_` can only be used on the left-hand side of an assignment
2- --> $DIR/suggest-array-length.rs:11:20
3- |
4- LL | let foo: [i32; _] = [1, 2, 3];
5- | ^ `_` not allowed here
6-
7- error: in expressions, `_` can only be used on the left-hand side of an assignment
8- --> $DIR/suggest-array-length.rs:14:20
9- |
10- LL | let bar: [i32; _] = [0; 3];
11- | ^ `_` not allowed here
12-
13- error: in expressions, `_` can only be used on the left-hand side of an assignment
14- --> $DIR/suggest-array-length.rs:17:25
15- |
16- LL | let ref_foo: &[i32; _] = &[1, 2, 3];
17- | ^ `_` not allowed here
18-
19- error: in expressions, `_` can only be used on the left-hand side of an assignment
20- --> $DIR/suggest-array-length.rs:20:25
21- |
22- LL | let ref_bar: &[i32; _] = &[0; 3];
23- | ^ `_` not allowed here
24-
25- error: in expressions, `_` can only be used on the left-hand side of an assignment
26- --> $DIR/suggest-array-length.rs:23:35
27- |
28- LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
29- | ^ `_` not allowed here
30-
31- error: in expressions, `_` can only be used on the left-hand side of an assignment
1+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
322 --> $DIR/suggest-array-length.rs:5:22
333 |
344LL | const Foo: [i32; _] = [1, 2, 3];
35- | ^ `_` not allowed here
5+ | ------^-
6+ | | |
7+ | | not allowed in type signatures
8+ | help: replace with the correct type: `[i32; 3]`
369
37- error: in expressions, `_` can only be used on the left-hand side of an assignment
38- --> $DIR/suggest-array-length.rs:8 :26
10+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for constants
11+ --> $DIR/suggest-array-length.rs:7 :26
3912 |
4013LL | const REF_FOO: &[u8; _] = &[1];
41- | ^ `_` not allowed here
14+ | ------^-
15+ | | |
16+ | | not allowed in type signatures
17+ | help: replace with the correct type: `&[u8; 1]`
4218
43- error[E0658]: using `_` for array lengths is unstable
44- --> $DIR/suggest-array-length.rs:5:22
45- |
46- LL | const Foo: [i32; _] = [1, 2, 3];
47- | ^ help: consider specifying the array length: `3`
48- |
49- = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
50- = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
51- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
19+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
20+ --> $DIR/suggest-array-length.rs:9:26
21+ |
22+ LL | static Statik: [i32; _] = [1, 2, 3];
23+ | ------^-
24+ | | |
25+ | | not allowed in type signatures
26+ | help: replace with the correct type: `[i32; 3]`
5227
53- error[E0658]: using `_` for array lengths is unstable
54- --> $DIR/suggest-array-length.rs:8:26
55- |
56- LL | const REF_FOO: &[u8; _] = &[1];
57- | ^ help: consider specifying the array length: `1`
58- |
59- = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
60- = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
61- = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
28+ error[E0121]: the placeholder `_` is not allowed within types on item signatures for static variables
29+ --> $DIR/suggest-array-length.rs:11:30
30+ |
31+ LL | static REF_STATIK: &[u8; _] = &[1];
32+ | ------^-
33+ | | |
34+ | | not allowed in type signatures
35+ | help: replace with the correct type: `&[u8; 1]`
6236
6337error[E0658]: using `_` for array lengths is unstable
64- --> $DIR/suggest-array-length.rs:11 :20
38+ --> $DIR/suggest-array-length.rs:13 :20
6539 |
6640LL | let foo: [i32; _] = [1, 2, 3];
6741 | ^ help: consider specifying the array length: `3`
@@ -71,7 +45,7 @@ LL | let foo: [i32; _] = [1, 2, 3];
7145 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
7246
7347error[E0658]: using `_` for array lengths is unstable
74- --> $DIR/suggest-array-length.rs:14 :20
48+ --> $DIR/suggest-array-length.rs:15 :20
7549 |
7650LL | let bar: [i32; _] = [0; 3];
7751 | ^ help: consider specifying the array length: `3`
@@ -91,7 +65,7 @@ LL | let ref_foo: &[i32; _] = &[1, 2, 3];
9165 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9266
9367error[E0658]: using `_` for array lengths is unstable
94- --> $DIR/suggest-array-length.rs:20 :25
68+ --> $DIR/suggest-array-length.rs:19 :25
9569 |
9670LL | let ref_bar: &[i32; _] = &[0; 3];
9771 | ^ help: consider specifying the array length: `3`
@@ -101,7 +75,7 @@ LL | let ref_bar: &[i32; _] = &[0; 3];
10175 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10276
10377error[E0658]: using `_` for array lengths is unstable
104- --> $DIR/suggest-array-length.rs:23 :35
78+ --> $DIR/suggest-array-length.rs:21 :35
10579 |
10680LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
10781 | ^ help: consider specifying the array length: `3`
@@ -110,6 +84,7 @@ LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
11084 = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
11185 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
11286
113- error: aborting due to 14 previous errors
87+ error: aborting due to 9 previous errors
11488
115- For more information about this error, try `rustc --explain E0658`.
89+ Some errors have detailed explanations: E0121, E0658.
90+ For more information about an error, try `rustc --explain E0121`.
0 commit comments