We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f59ab5 commit fa2f31bCopy full SHA for fa2f31b
src/test/ui/closures/supertrait-hint-cycle-2.rs
@@ -0,0 +1,18 @@
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
src/test/ui/closures/supertrait-hint-cycle-3.rs
@@ -0,0 +1,16 @@
+fn needs_super<F: for<'a> Fn(<F as Foo<'a>>::Input) + for<'a> Foo<'a>>(_: F) {}
0 commit comments