rust/tests/ui/impl-trait/issue-87450.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
1003 B
Plaintext
Raw Normal View History

2021-07-30 13:32:22 -05:00
warning: function cannot return without recursing
--> $DIR/issue-87450.rs:5:1
|
LL | fn foo() -> impl Fn() {
| ^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
...
LL | wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
| ----- recursive call site
|
= help: a `loop` may express intention better if this is on purpose
2022-09-18 10:55:36 -05:00
= note: `#[warn(unconditional_recursion)]` on by default
2021-07-30 13:32:22 -05:00
error[E0720]: cannot resolve opaque type
--> $DIR/issue-87450.rs:5:13
|
LL | fn foo() -> impl Fn() {
| ^^^^^^^^^ recursive opaque type
...
LL | wrap(wrap(wrap(wrap(wrap(wrap(wrap(foo())))))))
| ----------------------------------------------- returning here with type `impl Fn()`
2021-07-30 13:32:22 -05:00
...
LL | fn wrap(f: impl Fn()) -> impl Fn() {
| --------- returning this opaque type `impl Fn()`
2021-07-30 13:32:22 -05:00
error: aborting due to previous error; 1 warning emitted
For more information about this error, try `rustc --explain E0720`.