2020-01-30 06:02:06 -06:00
|
|
|
error: functions cannot be both `const` and `async`
|
2020-03-06 12:55:21 -06:00
|
|
|
--> $DIR/no-const-async.rs:4:5
|
2019-06-24 19:48:21 -05:00
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
2020-03-06 12:55:21 -06:00
|
|
|
| ----^^^^^-^^^^^----------
|
2020-01-30 06:02:06 -06:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
2019-06-24 19:48:21 -05:00
|
|
|
|
2022-02-14 10:10:22 -06:00
|
|
|
error[E0391]: cycle detected when computing type of `x::{opaque#0}`
|
|
|
|
--> $DIR/no-const-async.rs:4:24
|
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: ...which requires borrow-checking `x`...
|
|
|
|
--> $DIR/no-const-async.rs:4:1
|
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2022-10-17 14:30:41 -05:00
|
|
|
note: ...which requires processing MIR for `x`...
|
2022-02-14 10:10:22 -06:00
|
|
|
--> $DIR/no-const-async.rs:4:1
|
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: ...which requires const checking `x`...
|
|
|
|
--> $DIR/no-const-async.rs:4:1
|
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
2023-02-01 23:49:07 -06:00
|
|
|
= note: ...which requires computing whether `x::{opaque#0}` is freeze...
|
|
|
|
= note: ...which requires evaluating trait selection obligation `x::{opaque#0}: core::marker::Freeze`...
|
2022-02-14 10:10:22 -06:00
|
|
|
= note: ...which again requires computing type of `x::{opaque#0}`, completing the cycle
|
|
|
|
note: cycle used when checking item types in top-level module
|
|
|
|
--> $DIR/no-const-async.rs:4:1
|
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
2022-07-23 07:42:54 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-02-14 10:10:22 -06:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2019-06-24 19:48:21 -05:00
|
|
|
|
2022-02-14 10:10:22 -06:00
|
|
|
For more information about this error, try `rustc --explain E0391`.
|