]> git.lizzy.rs Git - rust.git/blob - tests/ui/closures/issue-97607.rs
Auto merge of #105716 - chriswailes:ndk-update-redux, r=pietroalbini
[rust.git] / tests / ui / closures / issue-97607.rs
1 // check-pass
2 #[allow(unused)]
3
4 fn test<T, F, U>(f: F) -> Box<dyn Fn(T) -> U + 'static>
5 where
6     F: 'static + Fn(T) -> U,
7     for<'a> U: 'a, // < This is the problematic line, see #97607
8 {
9     Box::new(move |t| f(t))
10 }
11
12 fn main() {}