Recover [T: N] as [T; N] · rust-lang/rust@d1052e4 (original) (raw)
`` @@ -4,7 +4,6 @@ error: expected ; or ], found ,
``
4
4
`LL | let b: [i32, 5];
`
5
5
`` | ^ expected ; or ]
``
6
6
` |
`
7
``
`-
= note: you might have meant to write a slice or array type
`
8
7
`` help: you might have meant to use ; as the separator
``
9
8
` |
`
10
9
`LL - let b: [i32, 5];
`
`@@ -19,16 +18,13 @@ LL | let a: [i32, ];
`
19
18
` | |
`
20
19
`` | while parsing the type for a
``
21
20
`` | help: use = if you meant to assign
``
22
``
`-
|
`
23
``
`-
= note: you might have meant to write a slice or array type
`
24
21
``
25
22
`` error: expected ; or ], found ,
``
26
23
` --> $DIR/array-type-no-semi.rs:12:16
`
27
24
` |
`
28
25
`LL | let c: [i32, x];
`
29
26
`` | ^ expected ; or ]
``
30
27
` |
`
31
``
`-
= note: you might have meant to write a slice or array type
`
32
28
`` help: you might have meant to use ; as the separator
``
33
29
` |
`
34
30
`LL - let c: [i32, x];
`
`` @@ -41,11 +37,22 @@ error: expected ; or ], found 5
``
41
37
`LL | let e: [i32 5];
`
42
38
`` | ^ expected ; or ]
``
43
39
` |
`
44
``
`-
= note: you might have meant to write a slice or array type
`
45
40
`` help: you might have meant to use ; as the separator
``
46
41
` |
`
47
``
`-
LL | let e: [i32 ;5];
`
48
``
`-
| +
`
``
42
`+
LL | let e: [i32; 5];
`
``
43
`+
| +
`
``
44
+
``
45
`` +
error: expected ; or ], found :
``
``
46
`+
--> $DIR/array-type-no-semi.rs:17:16
`
``
47
`+
|
`
``
48
`+
LL | let f: [i32: 1 - 1];
`
``
49
`` +
| ^ expected ; or ]
``
``
50
`+
|
`
``
51
`` +
help: you might have meant to use ; as the separator
``
``
52
`+
|
`
``
53
`+
LL - let f: [i32: 1 - 1];
`
``
54
`+
LL + let f: [i32; 1 - 1];
`
``
55
`+
|
`
49
56
``
50
57
`error[E0435]: attempt to use a non-constant value in a constant
`
51
58
` --> $DIR/array-type-no-semi.rs:12:18
`
`` @@ -65,7 +72,7 @@ error[E0423]: expected value, found builtin type i32
``
65
72
`LL | let a: [i32, ];
`
66
73
` | ^^^ not a value
`
67
74
``
68
``
`-
error: aborting due to 6 previous errors
`
``
75
`+
error: aborting due to 7 previous errors
`
69
76
``
70
77
`Some errors have detailed explanations: E0423, E0435.
`
71
78
`` For more information about an error, try rustc --explain E0423.
``