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
32
2
--> $DIR/suggest-array-length.rs:5:22
33
3
|
34
4
LL | 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]`
36
9
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
39
12
|
40
13
LL | 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]`
42
18
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]`
52
27
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]`
62
36
63
37
error[E0658]: using `_` for array lengths is unstable
64
- --> $DIR/suggest-array-length.rs:11 :20
38
+ --> $DIR/suggest-array-length.rs:13 :20
65
39
|
66
40
LL | let foo: [i32; _] = [1, 2, 3];
67
41
| ^ help: consider specifying the array length: `3`
@@ -71,7 +45,7 @@ LL | let foo: [i32; _] = [1, 2, 3];
71
45
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
72
46
73
47
error[E0658]: using `_` for array lengths is unstable
74
- --> $DIR/suggest-array-length.rs:14 :20
48
+ --> $DIR/suggest-array-length.rs:15 :20
75
49
|
76
50
LL | let bar: [i32; _] = [0; 3];
77
51
| ^ help: consider specifying the array length: `3`
@@ -91,7 +65,7 @@ LL | let ref_foo: &[i32; _] = &[1, 2, 3];
91
65
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
92
66
93
67
error[E0658]: using `_` for array lengths is unstable
94
- --> $DIR/suggest-array-length.rs:20 :25
68
+ --> $DIR/suggest-array-length.rs:19 :25
95
69
|
96
70
LL | let ref_bar: &[i32; _] = &[0; 3];
97
71
| ^ help: consider specifying the array length: `3`
@@ -101,7 +75,7 @@ LL | let ref_bar: &[i32; _] = &[0; 3];
101
75
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
102
76
103
77
error[E0658]: using `_` for array lengths is unstable
104
- --> $DIR/suggest-array-length.rs:23 :35
78
+ --> $DIR/suggest-array-length.rs:21 :35
105
79
|
106
80
LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
107
81
| ^ help: consider specifying the array length: `3`
@@ -110,6 +84,7 @@ LL | let multiple_ref_foo: &&[i32; _] = &&[1, 2, 3];
110
84
= help: add `#![feature(generic_arg_infer)]` to the crate attributes to enable
111
85
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
112
86
113
- error: aborting due to 14 previous errors
87
+ error: aborting due to 9 previous errors
114
88
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