1 // Test that unboxed closures cannot capture their own type.
2 //
3 // Also regression test for issue #21410.
4 
g<F>(_: F) where F: FnOnce(Option<F>)5 fn g<F>(_: F) where F: FnOnce(Option<F>) {}
6 
main()7 fn main() {
8     g(|_| {  }); //~ ERROR closure/generator type that references itself
9 }
10