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
4319error[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
52-
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
62-
63- error[E0658]: using `_` for array lengths is unstable
64- --> $DIR/suggest-array-length.rs:11:20
20+ --> $DIR/suggest-array-length.rs:9:20
6521 |
6622LL | let foo: [i32; _] = [1, 2, 3];
6723 | ^ help: consider specifying the array length: `3`
@@ -71,7 +27,7 @@ LL | let foo: [i32; _] = [1, 2, 3];
7127 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
7228
7329error[E0658]: using `_` for array lengths is unstable
74- --> $DIR/suggest-array-length.rs:14 :20
30+ --> $DIR/suggest-array-length.rs:11 :20
7531 |
7632LL | let bar: [i32; _] = [0; 3];
7733 | ^ help: consider specifying the array length: `3`
@@ -81,7 +37,7 @@ LL | let bar: [i32; _] = [0; 3];
8137 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
8238
8339error[E0658]: using `_` for array lengths is unstable
84- --> $DIR/suggest-array-length.rs:17 :25
40+ --> $DIR/suggest-array-length.rs:13 :25
8541 |
8642LL | let ref_foo: &[i32; _] = &[1, 2, 3];
8743 | ^ help: consider specifying the array length: `3`
@@ -91,7 +47,7 @@ LL | let ref_foo: &[i32; _] = &[1, 2, 3];
9147 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9248
9349error[E0658]: using `_` for array lengths is unstable
94- --> $DIR/suggest-array-length.rs:20 :25
50+ --> $DIR/suggest-array-length.rs:15 :25
9551 |
9652LL | let ref_bar: &[i32; _] = &[0; 3];
9753 | ^ help: consider specifying the array length: `3`
@@ -101,7 +57,7 @@ LL | let ref_bar: &[i32; _] = &[0; 3];
10157 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
10258
10359error[E0658]: using `_` for array lengths is unstable
104- --> $DIR/suggest-array-length.rs:23 :35
60+ --> $DIR/suggest-array-length.rs:17 :35
10561 |
10662LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
10763 | ^ help: consider specifying the array length: `3`
@@ -110,6 +66,7 @@ LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
11066 = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
11167 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
11268
113- error: aborting due to 14 previous errors
69+ error: aborting due to 7 previous errors
11470
115- For more information about this error, try `rustc --explain E0658`.
71+ Some errors have detailed explanations: E0121, E0658.
72+ For more information about an error, try `rustc --explain E0121`.
0 commit comments