blob: 657f4b513042cba5514336c6b77c062485dbbc2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// Test that we emit an error if we cannot properly infer a constant.
// 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
}
|