Sign in
fuchsia
/
third_party
/
rust
/
a9aa2dfe844840a7e414873ce55ef9d02f1038a7
/
.
/
src
/
test
/
ui
/
unboxed-closures
/
unboxed-closure-no-cyclic-sig.rs
blob: 9d0aa413207abb3f69d4a688d4c9dc365112124f [
file
] [
log
] [
blame
]
// 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/generator type that references itself
}