]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/incorrect-number-of-const-args.min.stderr
Rollup merge of #83367 - richkadel:query-err-msg, r=jyn514
[rust.git] / src / test / ui / const-generics / incorrect-number-of-const-args.min.stderr
1 error[E0107]: this function takes 2 const arguments but only 1 const argument was supplied
2   --> $DIR/incorrect-number-of-const-args.rs:11:5
3    |
4 LL |     foo::<0>();
5    |     ^^^   - supplied 1 const argument
6    |     |
7    |     expected 2 const arguments
8    |
9 note: function defined here, with 2 const parameters: `X`, `Y`
10   --> $DIR/incorrect-number-of-const-args.rs:6:4
11    |
12 LL | fn foo<const X: usize, const Y: usize>() -> usize {
13    |    ^^^       -               -
14 help: add missing const argument
15    |
16 LL |     foo::<0, Y>();
17    |            ^^^
18
19 error[E0107]: this function takes 2 const arguments but 3 const arguments were supplied
20   --> $DIR/incorrect-number-of-const-args.rs:14:5
21    |
22 LL |     foo::<0, 0, 0>();
23    |     ^^^       --- help: remove this const argument
24    |     |
25    |     expected 2 const arguments
26    |
27 note: function defined here, with 2 const parameters: `X`, `Y`
28   --> $DIR/incorrect-number-of-const-args.rs:6: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`.