fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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