]> git.proxmox.com Git - rustc.git/blob - tests/ui/generic-associated-types/issue-68644-codegen-selection.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / generic-associated-types / issue-68644-codegen-selection.rs
1 // Regression test for #68644
2
3 trait Fun {
4 type F<'a>: Fn() -> u32;
5
6 fn callme<'a>(f: Self::F<'a>) -> u32 {
7 f()
8 }
9 }
10
11 impl<T> Fun for T {
12 type F<'a> = Self;
13 //~^ ERROR expected a `Fn<()>` closure, found `T`
14 }
15
16 fn main() {
17 <u8>::callme(0);
18 }