]> git.lizzy.rs Git - rust.git/blob - src/test/ui/nll/issue-97997.rs
Rollup merge of #103644 - catlee:catlee/option-question-mark-docs, r=workingjubilee
[rust.git] / src / test / ui / nll / issue-97997.rs
1 trait Foo {
2     const ASSOC: bool = true;
3 }
4 impl<T> Foo for fn(T) {}
5
6 fn foo(_x: i32) {}
7
8 fn impls_foo<T: Foo>(_x: T) {}
9
10 fn main() {
11     impls_foo(foo as fn(i32));
12
13     <fn(&u8) as Foo>::ASSOC;
14     //~^ ERROR implementation of `Foo` is not general enough
15     //~| ERROR implementation of `Foo` is not general enough
16 }