2020-01-30 13:02:06 +01:00
|
|
|
error: functions cannot be both `const` and `async`
|
|
|
|
--> $DIR/no-const-async.rs:4:1
|
2019-06-24 17:48:21 -07:00
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
2020-01-30 13:02:06 +01:00
|
|
|
| ^^^^-----^-----^^^^^^^^^^
|
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
2019-06-24 17:48:21 -07:00
|
|
|
|
2020-02-14 22:39:55 +00:00
|
|
|
error[E0723]: `impl Trait` in const fn is unstable
|
|
|
|
--> $DIR/no-const-async.rs:4:24
|
|
|
|
|
|
|
|
|
LL | pub const async fn x() {}
|
|
|
|
| ^
|
|
|
|
|
|
|
|
|
= note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
|
|
|
|
= help: add `#![feature(const_fn)]` to the crate attributes to enable
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
2019-06-24 17:48:21 -07:00
|
|
|
|
2020-02-14 22:39:55 +00:00
|
|
|
For more information about this error, try `rustc --explain E0723`.
|