mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 11:34:11 +00:00
Rollup merge of #103341 - Rageking8:add-test-for-issue-97607, r=compiler-errors
Add test for issue 97607 Fixes #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.
This commit is contained in:
commit
db4696a546
12
src/test/ui/closures/issue-97607.rs
Normal file
12
src/test/ui/closures/issue-97607.rs
Normal file
@ -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() {}
|
Loading…
Reference in New Issue
Block a user