2020-08-09 01:19:57 -05:00
|
|
|
// Test that we emit an error if we cannot properly infer a constant.
|
2020-05-09 17:01:23 -05:00
|
|
|
|
|
|
|
// taken from https://github.com/rust-lang/rust/issues/70507#issuecomment-615268893
|
|
|
|
struct Foo;
|
|
|
|
impl Foo {
|
2020-10-08 15:23:01 -05:00
|
|
|
fn foo<const A: usize, const B: usize>(self) {}
|
2020-05-09 17:01:23 -05:00
|
|
|
}
|
|
|
|
fn main() {
|
|
|
|
Foo.foo();
|
|
|
|
//~^ ERROR type annotations needed
|
|
|
|
}
|