2020-01-30 13:02:06 +01:00
|
|
|
error: functions cannot be both `const` and `async`
|
2021-05-07 18:56:16 +02:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:12:5
|
2020-01-30 13:02:06 +01:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
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`
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:16: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
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:18: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
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:20: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`
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:20: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`
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:20: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`
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:28: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
|
2021-05-07 18:56:16 +02:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:31: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
|
2021-05-07 18:56:16 +02:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33: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`
|
2021-05-07 18:56:16 +02:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33: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`
|
2021-05-07 18:56:16 +02:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33: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`
|
2021-05-07 18:56:16 +02:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:45: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
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:50:18
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-09-01 17:12:52 -04:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-30 00:18:54 +01:00
|
|
|
LL | async fn fe1();
|
2020-11-15 15:34:51 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe1();
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:51:19
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-09-01 17:12:52 -04:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-30 00:18:54 +01:00
|
|
|
LL | async fn fe1();
|
|
|
|
LL | unsafe fn fe2();
|
2020-11-15 15:34:51 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe2();
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:52:18
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-09-01 17:12:52 -04:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-30 00:18:54 +01:00
|
|
|
...
|
|
|
|
LL | const fn fe3();
|
2020-11-15 15:34:51 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe3();
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:53:23
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-09-01 17:12:52 -04:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-30 00:18:54 +01:00
|
|
|
...
|
|
|
|
LL | extern "C" fn fe4();
|
2020-11-15 15:34:51 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe4();
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:54:42
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2020-09-01 17:12:52 -04:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-30 00:18:54 +01:00
|
|
|
...
|
2020-01-30 08:31:31 +01:00
|
|
|
LL | const async unsafe extern "C" fn fe5();
|
2020-11-15 15:34:51 -06:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe5();
|
2021-06-21 19:07:19 -07:00
|
|
|
| ~~
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2020-01-30 13:02:06 +01:00
|
|
|
error: functions cannot be both `const` and `async`
|
2022-02-11 07:18:06 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:54: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
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
error[E0053]: method `ft1` has an incompatible type for trait
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:28:24
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
LL | async fn ft1() {}
|
|
|
|
| ^
|
|
|
|
| |
|
|
|
|
| checked the `Output` of this `async fn`, found opaque type
|
|
|
|
| expected `()`, found opaque type
|
2021-08-20 14:47:12 +00:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
= note: while checking the return type of the `async fn`
|
|
|
|
note: type in trait
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:16:23
|
2021-08-20 14:47:12 +00:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
LL | async fn ft1();
|
|
|
|
| ^
|
|
|
|
= note: expected fn pointer `fn()`
|
|
|
|
found fn pointer `fn() -> impl Future<Output = ()>`
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
error[E0053]: method `ft5` has an incompatible type for trait
|
2021-05-07 18:56:16 +02:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33: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() {}
|
|
|
|
| ^
|
2022-02-11 07:18:06 +00:00
|
|
|
| |
|
|
|
|
| checked the `Output` of this `async fn`, found opaque type
|
|
|
|
| expected `()`, found opaque type
|
2020-01-30 00:18:54 +01:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
= note: while checking the return type of the `async fn`
|
|
|
|
note: type in trait
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:20:47
|
2021-08-20 14:47:12 +00:00
|
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
|
|
|
| ^
|
|
|
|
= note: expected fn pointer `unsafe extern "C" fn()`
|
|
|
|
found fn pointer `unsafe extern "C" fn() -> impl Future<Output = ()>`
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
error: aborting due to 20 previous errors
|
2020-01-30 00:18:54 +01:00
|
|
|
|
2022-02-11 07:18:06 +00:00
|
|
|
Some errors have detailed explanations: E0053, E0379, E0706.
|
|
|
|
For more information about an error, try `rustc --explain E0053`.
|