We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b1ab3b7 commit 353ef69Copy full SHA for 353ef69
1 file changed
src/test/ui/closures/issue-97607.rs
@@ -0,0 +1,12 @@
1
+// check-pass
2
+#[allow(unused)]
3
+
4
+fn test<T, F, U>(f: F) -> Box<dyn Fn(T) -> U + 'static>
5
+where
6
+ F: 'static + Fn(T) -> U,
7
+ for<'a> U: 'a, // < This is the problematic line, see #97607
8
+{
9
+ Box::new(move |t| f(t))
10
+}
11
12
+fn main() {}
0 commit comments