]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-62878.full.stderr
Const parameters can not be inferred with `_`
[rust.git] / src / test / ui / const-generics / issues / issue-62878.full.stderr
1 error[E0770]: the type of const parameters must not depend on other generic parameters
2   --> $DIR/issue-62878.rs:6:38
3    |
4 LL | fn foo<const N: usize, const A: [u8; N]>() {}
5    |                                      ^ the type must not depend on the parameter `N`
6
7 error[E0747]: type provided when a constant was expected
8   --> $DIR/issue-62878.rs:11:11
9    |
10 LL |     foo::<_, {[1]}>();
11    |           ^
12    |
13    = help: const arguments cannot yet be inferred with `_`
14
15 error[E0308]: mismatched types
16   --> $DIR/issue-62878.rs:11:15
17    |
18 LL |     foo::<_, {[1]}>();
19    |               ^^^ expected `usize`, found array `[{integer}; 1]`
20
21 error: aborting due to 3 previous errors
22
23 Some errors have detailed explanations: E0308, E0747, E0770.
24 For more information about an error, try `rustc --explain E0308`.