Skip to content

Commit

Permalink
Rollup merge of rust-lang#103341 - Rageking8:add-test-for-issue-97607…
Browse files Browse the repository at this point in the history
…, r=compiler-errors

Add test for issue 97607

Fixes rust-lang#97607

r? `@compiler-errors`

Not sure which UI test dir to put this under, kindly let me know of a better dir if necessary and I will change it. Thanks.
  • Loading branch information
notriddle authored Oct 21, 2022
2 parents 9fcbde8 + 353ef69 commit f9b319f
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 f9b319f

Please sign in to comment.