]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/incorrect-number-of-const-args.rs
Rollup merge of #75485 - RalfJung:pin, r=nagisa
[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 #![cfg_attr(min, feature(min_const_generics))]
6
7 fn foo<const X: usize, const Y: usize>() -> usize {
8     0
9 }
10
11 fn main() {
12     foo::<0>(); //~ ERROR wrong number of const arguments: expected 2, found 1
13     foo::<0, 0, 0>(); //~ ERROR wrong number of const arguments: expected 2, found 3
14 }