1
1
error: in expressions, `_` can only be used on the left-hand side of an assignment
2
- --> $DIR/suggest-array-length.rs:8 :20
2
+ --> $DIR/suggest-array-length.rs:11 :20
3
3
|
4
4
LL | let foo: [i32; _] = [1, 2, 3];
5
5
| ^ `_` not allowed here
6
6
7
7
error: in expressions, `_` can only be used on the left-hand side of an assignment
8
- --> $DIR/suggest-array-length.rs:11 :20
8
+ --> $DIR/suggest-array-length.rs:14 :20
9
9
|
10
10
LL | let bar: [i32; _] = [0; 3];
11
11
| ^ `_` not allowed here
12
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
+
13
31
error: in expressions, `_` can only be used on the left-hand side of an assignment
14
32
--> $DIR/suggest-array-length.rs:5:22
15
33
|
16
34
LL | const Foo: [i32; _] = [1, 2, 3];
17
35
| ^ `_` not allowed here
18
36
37
+ error: in expressions, `_` can only be used on the left-hand side of an assignment
38
+ --> $DIR/suggest-array-length.rs:8:26
39
+ |
40
+ LL | const REF_FOO: &[u8; _] = &[1];
41
+ | ^ `_` not allowed here
42
+
19
43
error[E0658]: using `_` for array lengths is unstable
20
44
--> $DIR/suggest-array-length.rs:5:22
21
45
|
@@ -26,7 +50,16 @@ LL | const Foo: [i32; _] = [1, 2, 3];
26
50
= help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
27
51
28
52
error[E0658]: using `_` for array lengths is unstable
29
- --> $DIR/suggest-array-length.rs:8:20
53
+ --> $DIR/suggest-array-length.rs:8:26
54
+ |
55
+ LL | const REF_FOO: &[u8; _] = &[1];
56
+ | ^ help: consider specifying the array length: `1`
57
+ |
58
+ = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
59
+ = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
60
+
61
+ error[E0658]: using `_` for array lengths is unstable
62
+ --> $DIR/suggest-array-length.rs:11:20
30
63
|
31
64
LL | let foo: [i32; _] = [1, 2, 3];
32
65
| ^ help: consider specifying the array length: `3`
@@ -35,14 +68,41 @@ LL | let foo: [i32; _] = [1, 2, 3];
35
68
= help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
36
69
37
70
error[E0658]: using `_` for array lengths is unstable
38
- --> $DIR/suggest-array-length.rs:11 :20
71
+ --> $DIR/suggest-array-length.rs:14 :20
39
72
|
40
73
LL | let bar: [i32; _] = [0; 3];
41
74
| ^ help: consider specifying the array length: `3`
42
75
|
43
76
= note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
44
77
= help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
45
78
46
- error: aborting due to 6 previous errors
79
+ error[E0658]: using `_` for array lengths is unstable
80
+ --> $DIR/suggest-array-length.rs:17:25
81
+ |
82
+ LL | let ref_foo: &[i32; _] = &[1, 2, 3];
83
+ | ^ help: consider specifying the array length: `3`
84
+ |
85
+ = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
86
+ = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
87
+
88
+ error[E0658]: using `_` for array lengths is unstable
89
+ --> $DIR/suggest-array-length.rs:20:25
90
+ |
91
+ LL | let ref_bar: &[i32; _] = &[0; 3];
92
+ | ^ help: consider specifying the array length: `3`
93
+ |
94
+ = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
95
+ = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
96
+
97
+ error[E0658]: using `_` for array lengths is unstable
98
+ --> $DIR/suggest-array-length.rs:23:35
99
+ |
100
+ LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
101
+ | ^ help: consider specifying the array length: `3`
102
+ |
103
+ = note: see issue #85077 <https://github.com/rust-lang/rust/issues/85077> for more information
104
+ = help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
105
+
106
+ error: aborting due to 14 previous errors
47
107
48
108
For more information about this error, try `rustc --explain E0658`.
0 commit comments