File: issue-62504.full.stderr

package info (click to toggle)
rustc-web 1.78.0%2Bdfsg1-2~deb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,245,360 kB
  • sloc: xml: 147,985; javascript: 18,022; sh: 11,083; python: 10,265; ansic: 6,172; cpp: 5,023; asm: 4,390; makefile: 4,269
file content (32 lines) | stat: -rw-r--r-- 1,051 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
error[E0308]: mismatched types
  --> $DIR/issue-62504.rs:18:21
   |
LL |         ArrayHolder([0; Self::SIZE])
   |                     ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
   |
   = note: expected constant `X`
              found constant `Self::SIZE`

error: unconstrained generic constant
  --> $DIR/issue-62504.rs:18:25
   |
LL |         ArrayHolder([0; Self::SIZE])
   |                         ^^^^^^^^^^
   |
   = help: try adding a `where` bound using this expression: `where [(); Self::SIZE]:`

error[E0282]: type annotations needed for `ArrayHolder<X>`
  --> $DIR/issue-62504.rs:26:9
   |
LL |     let mut array = ArrayHolder::new();
   |         ^^^^^^^^^
   |
help: consider giving `array` an explicit type, where the value of const parameter `X` is specified
   |
LL |     let mut array: ArrayHolder<X> = ArrayHolder::new();
   |                  ++++++++++++++++

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0282, E0308.
For more information about an error, try `rustc --explain E0282`.