fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1warning: function cannot return without recursing 2 --> $DIR/issue-87450.rs:5:1 3 | 4LL | fn foo() -> impl Fn() { 5 | ^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing 6... 7LL | wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo()))))))) 8 | ----- recursive call site 9 | 10 = help: a `loop` may express intention better if this is on purpose 11 = note: `#[warn(unconditional_recursion)]` on by default 12 13error[E0720]: cannot resolve opaque type 14 --> $DIR/issue-87450.rs:5:13 15 | 16LL | fn foo() -> impl Fn() { 17 | ^^^^^^^^^ recursive opaque type 18... 19LL | wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo()))))))) 20 | ----------------------------------------------- returning here with type `impl Fn()` 21... 22LL | fn wrap(f: impl Fn()) -> impl Fn() { 23 | --------- returning this opaque type `impl Fn()` 24 25error: aborting due to previous error; 1 warning emitted 26 27For more information about this error, try `rustc --explain E0720`.