about summary refs log tree commit diff
path: root/src/test/ui/const-generics/infer/cannot-infer-const-args.rs
blob: cc52892bd04b77be911dcecbb19fc4236136f419 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// revisions: full min

#![cfg_attr(full, feature(const_generics))]
#![cfg_attr(full, allow(incomplete_features))]

fn foo<const X: usize>() -> usize {
    0
}

fn main() {
    foo(); //~ ERROR type annotations needed
}