2020-01-30 12:02:06 +00:00
|
|
|
error: functions cannot be both `const` and `async`
|
2021-05-07 16:56:16 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:12:5
|
2020-01-30 12:02:06 +00:00
|
|
|
|
|
2022-02-14 16:10:22 +00:00
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
2020-03-06 18:55:21 +00:00
|
|
|
| ^^^^^-^^^^^------------------------------
|
2020-01-30 12:02:06 +00:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2020-02-11 07:19:21 +00:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:19:9
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
|
|
|
LL | const fn ft3();
|
2020-02-11 07:19:21 +00:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-29 23:18:54 +00:00
|
|
|
|
2020-02-11 07:19:21 +00:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:21:9
|
2020-01-30 07:31:31 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
2020-02-11 07:19:21 +00:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-30 07:31:31 +00:00
|
|
|
|
2020-01-30 12:02:06 +00:00
|
|
|
error: functions cannot be both `const` and `async`
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:21:9
|
2020-01-30 12:02:06 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
2020-03-06 18:55:21 +00:00
|
|
|
| ^^^^^-^^^^^----------------------------
|
2020-01-30 12:02:06 +00:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2020-02-11 07:19:21 +00:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:31:9
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
|
|
|
LL | const fn ft3() {}
|
2020-02-11 07:19:21 +00:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-29 23:18:54 +00:00
|
|
|
|
2020-02-11 07:19:21 +00:00
|
|
|
error[E0379]: functions in traits cannot be declared const
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
2020-01-30 07:31:31 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
2020-02-11 07:19:21 +00:00
|
|
|
| ^^^^^ functions in traits cannot be const
|
2020-01-30 07:31:31 +00:00
|
|
|
|
2020-01-30 12:02:06 +00:00
|
|
|
error: functions cannot be both `const` and `async`
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
2020-01-30 12:02:06 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
2020-03-06 18:55:21 +00:00
|
|
|
| ^^^^^-^^^^^------------------------------
|
2020-01-30 12:02:06 +00:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
|
|
|
error: functions cannot be both `const` and `async`
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:45:9
|
2020-01-30 12:02:06 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
2020-03-06 18:55:21 +00:00
|
|
|
| ^^^^^-^^^^^------------------------------
|
2020-01-30 12:02:06 +00:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2020-01-29 23:18:54 +00:00
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:51:18
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-29 23:18:54 +00:00
|
|
|
LL | async fn fe1();
|
2020-11-15 21:34:51 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe1();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:52:19
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-29 23:18:54 +00:00
|
|
|
LL | async fn fe1();
|
|
|
|
LL | unsafe fn fe2();
|
2020-11-15 21:34:51 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe2();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:53:18
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-29 23:18:54 +00:00
|
|
|
...
|
|
|
|
LL | const fn fe3();
|
2020-11-15 21:34:51 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe3();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:54:23
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-29 23:18:54 +00:00
|
|
|
...
|
|
|
|
LL | extern "C" fn fe4();
|
2020-11-15 21:34:51 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe4();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:55:42
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2020-09-01 21:12:52 +00:00
|
|
|
LL | extern "C" {
|
|
|
|
| ---------- in this `extern` block
|
2020-01-29 23:18:54 +00:00
|
|
|
...
|
2020-01-30 07:31:31 +00:00
|
|
|
LL | const async unsafe extern "C" fn fe5();
|
2020-11-15 21:34:51 +00:00
|
|
|
| ^^^
|
|
|
|
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
|
|
|
|
LL | fn fe5();
|
2021-06-22 02:07:19 +00:00
|
|
|
| ~~
|
2020-01-29 23:18:54 +00:00
|
|
|
|
2020-01-30 12:02:06 +00:00
|
|
|
error: functions cannot be both `const` and `async`
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:55:9
|
2020-01-30 12:02:06 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fe5();
|
2020-03-06 18:55:21 +00:00
|
|
|
| ^^^^^-^^^^^----------------------------
|
2020-01-30 12:02:06 +00:00
|
|
|
| | |
|
|
|
|
| | `async` because of this
|
|
|
|
| `const` because of this
|
|
|
|
|
2022-09-02 17:54:58 +00:00
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:17:9
|
|
|
|
|
|
|
|
|
LL | async fn ft1();
|
|
|
|
| -----^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
2022-08-18 23:27:16 +00:00
|
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
2022-09-02 17:54:58 +00:00
|
|
|
|
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:21:9
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
|
|
|
| ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
2022-08-18 23:27:16 +00:00
|
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
2022-09-02 17:54:58 +00:00
|
|
|
|
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:29:9
|
|
|
|
|
|
|
|
|
LL | async fn ft1() {}
|
|
|
|
| -----^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
2022-08-18 23:27:16 +00:00
|
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
2022-09-02 17:54:58 +00:00
|
|
|
|
|
|
|
error[E0706]: functions in traits cannot be declared `async`
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| `async` because of this
|
|
|
|
|
|
|
|
|
= note: `async` trait functions are not currently supported
|
|
|
|
= note: consider using the `async-trait` crate: https://crates.io/crates/async-trait
|
|
|
|
= note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
|
2022-08-18 23:27:16 +00:00
|
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
2022-09-02 17:54:58 +00:00
|
|
|
|
2022-02-14 16:10:22 +00:00
|
|
|
error[E0391]: cycle detected when computing type of `main::ff5::{opaque#0}`
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:12:44
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2022-02-14 16:10:22 +00:00
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
|
|
|
| ^
|
2021-08-20 14:47:12 +00:00
|
|
|
|
|
2022-02-14 16:10:22 +00:00
|
|
|
note: ...which requires borrow-checking `main::ff5`...
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:12:5
|
2021-08-20 14:47:12 +00:00
|
|
|
|
|
2022-02-14 16:10:22 +00:00
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-10-17 19:30:41 +00:00
|
|
|
note: ...which requires processing MIR for `main::ff5`...
|
2022-02-14 16:10:22 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:12:5
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: ...which requires const checking `main::ff5`...
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:12:5
|
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-02-02 05:49:07 +00:00
|
|
|
= note: ...which requires computing whether `main::ff5::{opaque#0}` is freeze...
|
|
|
|
= note: ...which requires evaluating trait selection obligation `main::ff5::{opaque#0}: core::marker::Freeze`...
|
2022-02-14 16:10:22 +00:00
|
|
|
= note: ...which again requires computing type of `main::ff5::{opaque#0}`, completing the cycle
|
|
|
|
note: cycle used when checking item types in top-level module
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:5:1
|
|
|
|
|
|
|
|
|
LL | / #![feature(const_extern_fn)]
|
|
|
|
LL | |
|
|
|
|
LL | | fn main() {
|
|
|
|
LL | | async fn ff1() {} // OK.
|
|
|
|
... |
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2020-01-29 23:18:54 +00:00
|
|
|
|
2022-02-13 15:27:59 +00:00
|
|
|
error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:48
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2020-01-30 07:31:31 +00:00
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^
|
2020-01-29 23:18:54 +00:00
|
|
|
|
|
2022-02-13 15:27:59 +00:00
|
|
|
note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
2021-08-20 14:47:12 +00:00
|
|
|
|
|
2022-02-14 16:10:22 +00:00
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-10-17 19:30:41 +00:00
|
|
|
note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-02-13 15:27:59 +00:00
|
|
|
note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-02-02 05:49:07 +00:00
|
|
|
= note: ...which requires computing whether `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}` is freeze...
|
|
|
|
= note: ...which requires evaluating trait selection obligation `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}: core::marker::Freeze`...
|
2022-02-13 15:27:59 +00:00
|
|
|
= note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`, completing the cycle
|
2022-02-14 16:10:22 +00:00
|
|
|
note: cycle used when checking item types in top-level module
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:5:1
|
|
|
|
|
|
|
|
|
LL | / #![feature(const_extern_fn)]
|
|
|
|
LL | |
|
|
|
|
LL | | fn main() {
|
|
|
|
LL | | async fn ff1() {} // OK.
|
|
|
|
... |
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
|
|
|
|
2022-09-02 17:54:58 +00:00
|
|
|
error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5::{opaque#0}`
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:45:48
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
|
|
| ^
|
|
|
|
|
|
2022-09-02 17:54:58 +00:00
|
|
|
note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:45:9
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-10-17 19:30:41 +00:00
|
|
|
note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
|
2022-09-02 17:54:58 +00:00
|
|
|
--> $DIR/fn-header-semantic-fail.rs:45:9
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-09-02 17:54:58 +00:00
|
|
|
note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:45:9
|
2022-02-14 16:10:22 +00:00
|
|
|
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-02-02 05:49:07 +00:00
|
|
|
= note: ...which requires computing whether `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5::{opaque#0}` is freeze...
|
|
|
|
= note: ...which requires evaluating trait selection obligation `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5::{opaque#0}: core::marker::Freeze`...
|
2022-09-02 17:54:58 +00:00
|
|
|
= note: ...which again requires computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5::{opaque#0}`, completing the cycle
|
2022-02-14 16:10:22 +00:00
|
|
|
note: cycle used when checking item types in top-level module
|
|
|
|
--> $DIR/fn-header-semantic-fail.rs:5:1
|
|
|
|
|
|
|
|
|
LL | / #![feature(const_extern_fn)]
|
|
|
|
LL | |
|
|
|
|
LL | | fn main() {
|
|
|
|
LL | | async fn ff1() {} // OK.
|
|
|
|
... |
|
|
|
|
LL | | }
|
|
|
|
LL | | }
|
|
|
|
| |_^
|
2020-01-29 23:18:54 +00:00
|
|
|
|
2022-09-02 17:54:58 +00:00
|
|
|
error: aborting due to 21 previous errors
|
2020-01-29 23:18:54 +00:00
|
|
|
|
2022-09-02 17:54:58 +00:00
|
|
|
Some errors have detailed explanations: E0379, E0391, E0706.
|
|
|
|
For more information about an error, try `rustc --explain E0379`.
|