about summary refs log tree commit diff
path: root/src/test/ui/const-generics/infer/uninferred-consts.rs
blob: bcd9aadb78af9f0692c1e9702ff0b976289570ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Test that we emit an error if we cannot properly infer a constant.
// revisions: full min

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

// taken from https://github.com/rust-lang/rust/issues/70507#issuecomment-615268893
struct Foo;
impl Foo {
    fn foo<const A: usize, const B: usize>(self) {}
}
fn main() {
    Foo.foo();
    //~^ ERROR type annotations needed
}