Skip to content

Commit

Permalink
add test for issue 97607
Browse files Browse the repository at this point in the history
  • Loading branch information
Rageking8 committed Oct 21, 2022
1 parent b1ab3b7 commit 353ef69
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/test/ui/closures/issue-97607.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// check-pass
#[allow(unused)]

fn test<T, F, U>(f: F) -> Box<dyn Fn(T) -> U + 'static>
where
F: 'static + Fn(T) -> U,
for<'a> U: 'a, // < This is the problematic line, see #97607
{
Box::new(move |t| f(t))
}

fn main() {}

0 comments on commit 353ef69

Please sign in to comment.