mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
17 lines
367 B
Rust
17 lines
367 B
Rust
fn bar() -> impl Fn() {
|
|
wrap(wrap(wrap(wrap(foo()))))
|
|
}
|
|
|
|
fn foo() -> impl Fn() {
|
|
//~^ WARNING 5:1: 5:22: function cannot return without recursing [unconditional_recursion]
|
|
//~| ERROR 5:13: 5:22: cannot resolve opaque type [E0720]
|
|
wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
|
|
}
|
|
|
|
fn wrap(f: impl Fn()) -> impl Fn() {
|
|
move || f()
|
|
}
|
|
|
|
fn main() {
|
|
}
|