Skip to content

Commit 353ef69

Browse files
committed
add test for issue 97607
1 parent b1ab3b7 commit 353ef69

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/ui/closures/issue-97607.rs

+12
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)