add test for issue 97607
This commit is contained in:
parent
b1ab3b738a
commit
353ef694fb
1 changed files with 12 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue