mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
aef0f4024a
And suggest adding the `#[coroutine]` to the closure
48 lines
1.6 KiB
Plaintext
48 lines
1.6 KiB
Plaintext
error[E0391]: cycle detected when type-checking `foo`
|
|
--> $DIR/clone-rpit.rs:13:1
|
|
|
|
|
LL | pub fn foo<'a, 'b>() -> impl Clone {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: ...which requires coroutine witness types for `foo::{closure#0}`...
|
|
--> $DIR/clone-rpit.rs:15:5
|
|
|
|
|
LL | move |_: ()| {
|
|
| ^^^^^^^^^^^^
|
|
note: ...which requires promoting constants in MIR for `foo::{closure#0}`...
|
|
--> $DIR/clone-rpit.rs:15:5
|
|
|
|
|
LL | move |_: ()| {
|
|
| ^^^^^^^^^^^^
|
|
note: ...which requires checking if `foo::{closure#0}` contains FFI-unwind calls...
|
|
--> $DIR/clone-rpit.rs:15:5
|
|
|
|
|
LL | move |_: ()| {
|
|
| ^^^^^^^^^^^^
|
|
note: ...which requires building MIR for `foo::{closure#0}`...
|
|
--> $DIR/clone-rpit.rs:15:5
|
|
|
|
|
LL | move |_: ()| {
|
|
| ^^^^^^^^^^^^
|
|
note: ...which requires match-checking `foo::{closure#0}`...
|
|
--> $DIR/clone-rpit.rs:15:5
|
|
|
|
|
LL | move |_: ()| {
|
|
| ^^^^^^^^^^^^
|
|
note: ...which requires type-checking `foo::{closure#0}`...
|
|
--> $DIR/clone-rpit.rs:15:5
|
|
|
|
|
LL | move |_: ()| {
|
|
| ^^^^^^^^^^^^
|
|
= note: ...which again requires type-checking `foo`, completing the cycle
|
|
note: cycle used when computing type of opaque `foo::{opaque#0}`
|
|
--> $DIR/clone-rpit.rs:13:25
|
|
|
|
|
LL | pub fn foo<'a, 'b>() -> impl Clone {
|
|
| ^^^^^^^^^^
|
|
= note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0391`.
|