mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-16 14:40:37 +00:00
10 lines
239 B
Rust
10 lines
239 B
Rust
// Test that unboxed closures cannot capture their own type.
|
|
//
|
|
// Also regression test for issue #21410.
|
|
|
|
fn g<F>(_: F) where F: FnOnce(Option<F>) {}
|
|
|
|
fn main() {
|
|
g(|_| { }); //~ ERROR closure/coroutine type that references itself
|
|
}
|