rust/tests/ui/nll/issue-97997.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
319 B
Rust
Raw Normal View History

2022-06-12 04:35:49 -05:00
trait Foo {
const ASSOC: bool = true;
}
impl<T> Foo for fn(T) {}
fn foo(_x: i32) {}
fn impls_foo<T: Foo>(_x: T) {}
fn main() {
impls_foo(foo as fn(i32));
<fn(&u8) as Foo>::ASSOC;
//~^ ERROR implementation of `Foo` is not general enough
//~| ERROR implementation of `Foo` is not general enough
}