mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
303 lines
11 KiB
Plaintext
303 lines
11 KiB
Plaintext
error: functions cannot be both `const` and `async`
|
|
--> $DIR/fn-header-semantic-fail.rs:12:5
|
|
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
|
| ^^^^^-^^^^^------------------------------
|
|
| | |
|
|
| | `async` because of this
|
|
| `const` because of this
|
|
|
|
error[E0379]: functions in traits cannot be declared const
|
|
--> $DIR/fn-header-semantic-fail.rs:19:9
|
|
|
|
|
LL | const fn ft3();
|
|
| ^^^^^ functions in traits cannot be const
|
|
|
|
error[E0379]: functions in traits cannot be declared const
|
|
--> $DIR/fn-header-semantic-fail.rs:21:9
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
|
| ^^^^^ functions in traits cannot be const
|
|
|
|
error: functions cannot be both `const` and `async`
|
|
--> $DIR/fn-header-semantic-fail.rs:21:9
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5();
|
|
| ^^^^^-^^^^^----------------------------
|
|
| | |
|
|
| | `async` because of this
|
|
| `const` because of this
|
|
|
|
error[E0379]: functions in traits cannot be declared const
|
|
--> $DIR/fn-header-semantic-fail.rs:31:9
|
|
|
|
|
LL | const fn ft3() {}
|
|
| ^^^^^ functions in traits cannot be const
|
|
|
|
error[E0379]: functions in traits cannot be declared const
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
| ^^^^^ functions in traits cannot be const
|
|
|
|
error: functions cannot be both `const` and `async`
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
| ^^^^^-^^^^^------------------------------
|
|
| | |
|
|
| | `async` because of this
|
|
| `const` because of this
|
|
|
|
error: functions cannot be both `const` and `async`
|
|
--> $DIR/fn-header-semantic-fail.rs:45:9
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
| ^^^^^-^^^^^------------------------------
|
|
| | |
|
|
| | `async` because of this
|
|
| `const` because of this
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
|
--> $DIR/fn-header-semantic-fail.rs:51:18
|
|
|
|
|
LL | extern "C" {
|
|
| ---------- in this `extern` block
|
|
LL | async fn fe1();
|
|
| ^^^
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
LL | fn fe1();
|
|
| ~~
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
|
--> $DIR/fn-header-semantic-fail.rs:52:19
|
|
|
|
|
LL | extern "C" {
|
|
| ---------- in this `extern` block
|
|
LL | async fn fe1();
|
|
LL | unsafe fn fe2();
|
|
| ^^^
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
LL | fn fe2();
|
|
| ~~
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
|
--> $DIR/fn-header-semantic-fail.rs:53:18
|
|
|
|
|
LL | extern "C" {
|
|
| ---------- in this `extern` block
|
|
...
|
|
LL | const fn fe3();
|
|
| ^^^
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
LL | fn fe3();
|
|
| ~~
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
|
--> $DIR/fn-header-semantic-fail.rs:54:23
|
|
|
|
|
LL | extern "C" {
|
|
| ---------- in this `extern` block
|
|
...
|
|
LL | extern "C" fn fe4();
|
|
| ^^^
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
LL | fn fe4();
|
|
| ~~
|
|
|
|
error: functions in `extern` blocks cannot have qualifiers
|
|
--> $DIR/fn-header-semantic-fail.rs:55:42
|
|
|
|
|
LL | extern "C" {
|
|
| ---------- in this `extern` block
|
|
...
|
|
LL | const async unsafe extern "C" fn fe5();
|
|
| ^^^
|
|
|
|
|
help: remove the qualifiers
|
|
|
|
|
LL | fn fe5();
|
|
| ~~
|
|
|
|
error: functions cannot be both `const` and `async`
|
|
--> $DIR/fn-header-semantic-fail.rs:55:9
|
|
|
|
|
LL | const async unsafe extern "C" fn fe5();
|
|
| ^^^^^-^^^^^----------------------------
|
|
| | |
|
|
| | `async` because of this
|
|
| `const` because of this
|
|
|
|
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
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
|
|
|
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
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
|
|
|
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
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
|
|
|
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
|
|
= help: add `#![feature(async_fn_in_trait)]` to the crate attributes to enable
|
|
|
|
error[E0391]: cycle detected when computing type of `main::ff5::{opaque#0}`
|
|
--> $DIR/fn-header-semantic-fail.rs:12:44
|
|
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
|
| ^
|
|
|
|
|
note: ...which requires borrow-checking `main::ff5`...
|
|
--> $DIR/fn-header-semantic-fail.rs:12:5
|
|
|
|
|
LL | const async unsafe extern "C" fn ff5() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
note: ...which requires processing MIR for `main::ff5`...
|
|
--> $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() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
|
|
= note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
|
|
= 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 | | }
|
|
| |_^
|
|
|
|
error[E0391]: cycle detected when computing type of `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5::{opaque#0}`
|
|
--> $DIR/fn-header-semantic-fail.rs:33:48
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
| ^
|
|
|
|
|
note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
note: ...which requires const checking `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
|
|
--> $DIR/fn-header-semantic-fail.rs:33:9
|
|
|
|
|
LL | const async unsafe extern "C" fn ft5() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
|
|
= note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
|
|
= 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
|
|
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 | | }
|
|
| |_^
|
|
|
|
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
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
| ^
|
|
|
|
|
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
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
|
|
--> $DIR/fn-header-semantic-fail.rs:45:9
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
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
|
|
|
|
|
LL | const async unsafe extern "C" fn fi5() {}
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
= note: ...which requires computing whether `impl core::future::future::Future<Output = ()>` is freeze...
|
|
= note: ...which requires evaluating trait selection obligation `impl core::future::future::Future<Output = ()>: core::marker::Freeze`...
|
|
= 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
|
|
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 | | }
|
|
| |_^
|
|
|
|
error: aborting due to 21 previous errors
|
|
|
|
Some errors have detailed explanations: E0379, E0391, E0706.
|
|
For more information about an error, try `rustc --explain E0379`.
|