]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/supertrait-hint-cycle-2.rs
Auto merge of #107541 - weihanglo:update-cargo, r=weihanglo
[rust.git] / tests / ui / closures / supertrait-hint-cycle-2.rs
1 // check-pass
2
3 trait Foo<'a> {
4     type Input;
5 }
6
7 impl<F: Fn(u32)> Foo<'_> for F {
8     type Input = u32;
9 }
10
11 trait SuperFn: for<'a> Foo<'a> + for<'a> Fn(<Self as Foo<'a>>::Input) {}
12 impl<T> SuperFn for T where T: for<'a> Fn(<Self as Foo<'a>>::Input) + for<'a> Foo<'a> {}
13
14 fn needs_super(_: impl SuperFn) {}
15
16 fn main() {
17     needs_super(|_: u32| {});
18 }