]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/incorrect-number-of-const-args.stderr
Rollup merge of #107819 - clubby789:x-py-root, r=jyn514
[rust.git] / tests / ui / const-generics / incorrect-number-of-const-args.stderr
1 error[E0107]: this function takes 2 generic arguments but 1 generic argument was supplied
2   --> $DIR/incorrect-number-of-const-args.rs:6:5
3    |
4 LL |     foo::<0>();
5    |     ^^^   - supplied 1 generic argument
6    |     |
7    |     expected 2 generic arguments
8    |
9 note: function defined here, with 2 generic parameters: `X`, `Y`
10   --> $DIR/incorrect-number-of-const-args.rs:1:4
11    |
12 LL | fn foo<const X: usize, const Y: usize>() -> usize {
13    |    ^^^ --------------  --------------
14 help: add missing generic argument
15    |
16 LL |     foo::<0, Y>();
17    |            +++
18
19 error[E0107]: this function takes 2 generic arguments but 3 generic arguments were supplied
20   --> $DIR/incorrect-number-of-const-args.rs:9:5
21    |
22 LL |     foo::<0, 0, 0>();
23    |     ^^^         - help: remove this generic argument
24    |     |
25    |     expected 2 generic arguments
26    |
27 note: function defined here, with 2 generic parameters: `X`, `Y`
28   --> $DIR/incorrect-number-of-const-args.rs:1:4
29    |
30 LL | fn foo<const X: usize, const Y: usize>() -> usize {
31    |    ^^^ --------------  --------------
32
33 error: aborting due to 2 previous errors
34
35 For more information about this error, try `rustc --explain E0107`.