2020-08-09 00:01:19 -05:00
|
|
|
// Test if emits error if cannot properly infer constant.
|
|
|
|
// revisions: full min
|
|
|
|
|
|
|
|
#![cfg_attr(full, feature(const_generics))]
|
|
|
|
#![cfg_attr(full, allow(incomplete_features))]
|
|
|
|
#![cfg_attr(min, feature(min_const_generics))]
|
2020-05-09 17:01:23 -05:00
|
|
|
|
|
|
|
// taken from https://github.com/rust-lang/rust/issues/70507#issuecomment-615268893
|
|
|
|
struct Foo;
|
|
|
|
impl Foo {
|
|
|
|
fn foo<const N: usize>(self) {}
|
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
Foo.foo();
|
|
|
|
//~^ ERROR type annotations needed
|
|
|
|
}
|