summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/issue-97997.rs
blob: c64e720b12f7f49bab8872566b4bcba5de396656 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
}