]> git.proxmox.com Git - rustc.git/blame - src/test/ui/nll/issue-97997.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / nll / issue-97997.rs
CommitLineData
923072b8
FG
1trait Foo {
2 const ASSOC: bool = true;
3}
4impl<T> Foo for fn(T) {}
5
6fn foo(_x: i32) {}
7
8fn impls_foo<T: Foo>(_x: T) {}
9
10fn 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}