@@ -18,18 +18,41 @@ help: try adding a `where` bound
18
18
LL | pub const fn new() -> Self where [(); Self::SIZE]: {
19
19
| +++++++++++++++++++++++
20
20
21
- error[E0282 ]: type annotations needed for `ArrayHolder<_>`
21
+ error[E0284 ]: type annotations needed for `ArrayHolder<_>`
22
22
--> $DIR/issue-62504.rs:26:9
23
23
|
24
24
LL | let mut array = ArrayHolder::new();
25
- | ^^^^^^^^^
25
+ | ^^^^^^^^^ ------------------ type must be known at this point
26
26
|
27
+ note: required by a bound in `ArrayHolder::<X>::new`
28
+ --> $DIR/issue-62504.rs:16:6
29
+ |
30
+ LL | impl<const X: usize> ArrayHolder<X> {
31
+ | ^^^^^^^^^^^^^^ required by this bound in `ArrayHolder::<X>::new`
32
+ LL | pub const fn new() -> Self {
33
+ | --- required by a bound in this associated function
34
+ help: consider giving `array` an explicit type, where the value of const parameter `X` is specified
35
+ |
36
+ LL | let mut array: ArrayHolder<X> = ArrayHolder::new();
37
+ | ++++++++++++++++
38
+
39
+ error[E0284]: type annotations needed for `ArrayHolder<_>`
40
+ --> $DIR/issue-62504.rs:26:9
41
+ |
42
+ LL | let mut array = ArrayHolder::new();
43
+ | ^^^^^^^^^ ----------- type must be known at this point
44
+ |
45
+ note: required by a bound in `ArrayHolder`
46
+ --> $DIR/issue-62504.rs:14:20
47
+ |
48
+ LL | struct ArrayHolder<const X: usize>([u32; X]);
49
+ | ^^^^^^^^^^^^^^ required by this bound in `ArrayHolder`
27
50
help: consider giving `array` an explicit type, where the value of const parameter `X` is specified
28
51
|
29
52
LL | let mut array: ArrayHolder<X> = ArrayHolder::new();
30
53
| ++++++++++++++++
31
54
32
- error: aborting due to 3 previous errors
55
+ error: aborting due to 4 previous errors
33
56
34
- Some errors have detailed explanations: E0282 , E0308.
35
- For more information about an error, try `rustc --explain E0282 `.
57
+ Some errors have detailed explanations: E0284 , E0308.
58
+ For more information about an error, try `rustc --explain E0284 `.
0 commit comments