]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/generic_const_exprs/issue-62504.min.stderr
Rollup merge of #106709 - khuey:disable_split_dwarf_inlining_by_default, r=davidtwco
[rust.git] / tests / ui / const-generics / generic_const_exprs / issue-62504.min.stderr
1 error: constant expression depends on a generic parameter
2   --> $DIR/issue-62504.rs:18:25
3    |
4 LL |         ArrayHolder([0; Self::SIZE])
5    |                         ^^^^^^^^^^
6    |
7    = note: this may fail depending on what value the parameter takes
8
9 error[E0308]: mismatched types
10   --> $DIR/issue-62504.rs:18:21
11    |
12 LL |         ArrayHolder([0; Self::SIZE])
13    |         ----------- ^^^^^^^^^^^^^^^ expected `X`, found `Self::SIZE`
14    |         |
15    |         arguments to this struct are incorrect
16    |
17    = note: expected array `[u32; X]`
18               found array `[u32; _]`
19 note: tuple struct defined here
20   --> $DIR/issue-62504.rs:14:8
21    |
22 LL | struct ArrayHolder<const X: usize>([u32; X]);
23    |        ^^^^^^^^^^^
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0308`.