]> git.lizzy.rs Git - rust.git/blob - tests/ui/generic-associated-types/issue-68644-codegen-selection.rs
Rollup merge of #103702 - WaffleLapkin:lift-sized-bounds-from-pointer-methods-where...
[rust.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 }