2020-01-30 13:02:06 +01:00
|
|
|
error: functions cannot be both `const` and `async`
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:13:5
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ff5() {} // OK.
|
2020-03-06 10:55:21 -08:00
|
|
|
| ^^^^^-^^^^^------------------------------
|
2020-01-30 13:02:06 +01:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:18:9
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | async fn ft1();
|
2020-01-30 05:31:04 +01:00
|
|
|
| -----^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:20:9
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | const fn ft3();
|
2020-02-11 08:19:21 +01:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:22:9
|
2020-01-30 08:31:31 +01:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
2020-02-11 08:19:21 +01:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-30 08:31:31 +01:00
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:22:9
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-01-30 08:31:31 +01:00
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
|
|
|
| ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
|
2020-01-30 13:02:06 +01:00
|
|
|
error: functions cannot be both `const` and `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:22:9
|
2020-01-30 13:02:06 +01:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
2020-03-06 10:55:21 -08:00
|
|
|
| ^^^^^-^^^^^----------------------------
|
2020-01-30 13:02:06 +01:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:30:9
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | async fn ft1() {}
|
2020-01-30 05:31:04 +01:00
|
|
|
| -----^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | const fn ft3() {}
|
2020-02-11 08:19:21 +01:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:35:9
|
2020-01-30 08:31:31 +01:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
2020-02-11 08:19:21 +01:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-30 08:31:31 +01:00
|
|
|
|
2020-02-11 08:19:21 +01:00
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:35:9
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-01-30 08:31:31 +01:00
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
|
2020-01-30 13:02:06 +01:00
|
|
|
error: functions cannot be both `const` and `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:35:9
|
2020-01-30 13:02:06 +01:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
2020-03-06 10:55:21 -08:00
|
|
|
| ^^^^^-^^^^^------------------------------
|
2020-01-30 13:02:06 +01:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
|
|
|
error: functions cannot be both `const` and `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:48:9
|
2020-01-30 13:02:06 +01:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
2020-03-06 10:55:21 -08:00
|
|
|
| ^^^^^-^^^^^------------------------------
|
2020-01-30 13:02:06 +01:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2020-01-30 00:18:54 +01:00
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:54:18
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | extern {
|
|
|
|
| ------ in this `extern` block
|
|
|
|
LL | async fn fe1();
|
|
|
|
| ---------^^^
|
|
|
|
| |
|
|
|
|
| help: remove the qualifiers: `fn`
|
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:55:19
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | extern {
|
|
|
|
| ------ in this `extern` block
|
|
|
|
LL | async fn fe1();
|
|
|
|
LL | unsafe fn fe2();
|
|
|
|
| ----------^^^
|
|
|
|
| |
|
|
|
|
| help: remove the qualifiers: `fn`
|
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:56:18
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | extern {
|
|
|
|
| ------ in this `extern` block
|
|
|
|
...
|
|
|
|
LL | const fn fe3();
|
|
|
|
| ---------^^^
|
|
|
|
| |
|
|
|
|
| help: remove the qualifiers: `fn`
|
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:57:23
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | extern {
|
|
|
|
| ------ in this `extern` block
|
|
|
|
...
|
|
|
|
LL | extern "C" fn fe4();
|
|
|
|
| --------------^^^
|
|
|
|
| |
|
|
|
|
| help: remove the qualifiers: `fn`
|
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:58:42
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | extern {
|
|
|
|
| ------ in this `extern` block
|
|
|
|
...
|
2020-01-30 08:31:31 +01:00
|
|
|
LL | const async unsafe extern "C" fn fe5();
|
|
|
|
| ---------------------------------^^^
|
|
|
|
| |
|
|
|
|
| help: remove the qualifiers: `fn`
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2020-01-30 13:02:06 +01:00
|
|
|
error: functions cannot be both `const` and `async`
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:58:9
|
2020-01-30 13:02:06 +01:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fe5();
|
2020-03-06 10:55:21 -08:00
|
|
|
| ^^^^^-^^^^^----------------------------
|
2020-01-30 13:02:06 +01:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2020-09-17 10:32:07 -07:00
|
|
|
error: `from_generator` is not yet stable as a const fn
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:13:44
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ff5() {} // OK.
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: add `#![feature(gen_future)]` to the crate attributes to enable
|
|
|
|
|
2020-01-30 00:18:54 +01:00
|
|
|
error[E0053]: method `ft1` has an incompatible type for trait
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:30:24
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
LL | async fn ft1();
|
|
|
|
| - type in trait
|
|
|
|
...
|
|
|
|
LL | async fn ft1() {}
|
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| the `Output` of this `async fn`'s found opaque type
|
|
|
|
| expected `()`, found opaque type
|
|
|
|
|
|
|
|
|
= note: expected fn pointer `fn()`
|
2020-09-02 10:40:56 +03:00
|
|
|
found fn pointer `fn() -> impl Future`
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
error[E0053]: method `ft5` has an incompatible type for trait
|
2020-09-17 10:32:07 -07:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:35:48
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-01-30 08:31:31 +01:00
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
|
|
|
| - type in trait
|
2020-01-30 00:18:54 +01:00
|
|
|
...
|
2020-01-30 08:31:31 +01:00
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| the `Output` of this `async fn`'s found opaque type
|
|
|
|
| expected `()`, found opaque type
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
|
= note: expected fn pointer `unsafe extern "C" fn()`
|
2020-09-02 10:40:56 +03:00
|
|
|
found fn pointer `unsafe extern "C" fn() -> impl Future`
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2020-09-17 10:32:07 -07:00
|
|
|
error: `from_generator` is not yet stable as a const fn
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:35:48
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: add `#![feature(gen_future)]` to the crate attributes to enable
|
|
|
|
|
|
|
|
error: `from_generator` is not yet stable as a const fn
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:48:48
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
|
|
| ^^
|
|
|
|
|
|
|
|
|
= help: add `#![feature(gen_future)]` to the crate attributes to enable
|
|
|
|
|
|
|
|
error: aborting due to 23 previous errors
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0053, E0379, E0706.
|
|
|
|
For more information about an error, try `rustc --explain E0053`.
|