]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/generic_const_exprs/issue-62504.full.stderr
Move generic error message to separate branches
[rust.git] / src / test / ui / const-generics / generic_const_exprs / issue-62504.full.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-62504.rs:18:21
3    |
4 LL |         ArrayHolder([0; Self::SIZE])
5    |                     ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
6    |
7    = note: expected type `X`
8               found type `Self::SIZE`
9
10 error: unconstrained generic constant
11   --> $DIR/issue-62504.rs:18:25
12    |
13 LL |         ArrayHolder([0; Self::SIZE])
14    |                         ^^^^^^^^^^
15    |
16    = help: try adding a `where` bound using this expression: `where [(); Self::SIZE]:`
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0308`.