Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
unboxed-closures
/
unboxed-closure-no-cyclic-sig.rs
blob: 057bdf0f618a4fd74a797e4ea9bd885328c637b9 [
file
] [
log
] [
blame
] [
edit
]
// 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
}