]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/incorrect-number-of-const-args.rs
Rollup merge of #83041 - guswynn:stable_debug_struct, r=m-ou-se
[rust.git] / src / test / ui / const-generics / incorrect-number-of-const-args.rs
1 // revisions: full min
2
3 #![cfg_attr(full, feature(const_generics))]
4 #![cfg_attr(full, allow(incomplete_features))]
5
6 fn foo<const X: usize, const Y: usize>() -> usize {
7     0
8 }
9
10 fn main() {
11     foo::<0>();
12     //~^ ERROR this function takes 2 const arguments but only 1 const argument was supplied
13
14     foo::<0, 0, 0>();
15     //~^ ERROR this function takes 2 const arguments but 3 const arguments were supplied
16 }