summaryrefslogtreecommitdiffstats
path: root/src/test/ui/closures/issue-97607.rs
blob: 74c910ad0bba6855b4ccfb7b2ae0be80236bf729 (plain)
1
2
3
4
5
6
7
8
9
10
11
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() {}