rust/tests/ui/parser/fn-header-semantic-fail.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

154 lines
4.3 KiB
Plaintext
Raw Normal View History

error: functions cannot be both `const` and `async`
2021-05-07 16:56:16 +00:00
--> $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:18:9
|
LL | const fn ft3();
2024-01-01 23:57:30 +00:00
| ^^^^^-
| |
| functions in traits cannot be const
| help: remove the `const`
error[E0379]: functions in traits cannot be declared const
--> $DIR/fn-header-semantic-fail.rs:20:9
|
LL | const async unsafe extern "C" fn ft5();
2024-01-01 23:57:30 +00:00
| ^^^^^-
| |
| functions in traits cannot be const
| help: remove the `const`
error: functions cannot be both `const` and `async`
--> $DIR/fn-header-semantic-fail.rs:20:9
|
LL | const async unsafe extern "C" fn ft5();
| ^^^^^-^^^^^----------------------------
| | |
| | `async` because of this
| `const` because of this
2024-01-01 23:26:50 +00:00
error[E0379]: functions in trait impls cannot be declared const
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:29:9
|
LL | const fn ft3() {}
2024-01-01 23:57:30 +00:00
| ^^^^^-
| |
| functions in trait impls cannot be const
| help: remove the `const`
2024-01-01 23:26:50 +00:00
error[E0379]: functions in trait impls cannot be declared const
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:31:9
|
LL | const async unsafe extern "C" fn ft5() {}
2024-01-01 23:57:30 +00:00
| ^^^^^-
| |
| functions in trait impls cannot be const
| help: remove the `const`
error: functions cannot be both `const` and `async`
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:31: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`
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:41: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
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:46:18
|
2020-09-01 21:12:52 +00:00
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
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:47:19
|
2020-09-01 21:12:52 +00:00
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
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:48:18
|
2020-09-01 21:12:52 +00:00
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
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:49:23
|
2020-09-01 21:12:52 +00:00
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
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:50:42
|
2020-09-01 21:12:52 +00:00
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`
2023-09-13 16:04:42 +00:00
--> $DIR/fn-header-semantic-fail.rs:50:9
|
LL | const async unsafe extern "C" fn fe5();
| ^^^^^-^^^^^----------------------------
| | |
| | `async` because of this
| `const` because of this
2023-09-13 16:04:42 +00:00
error: aborting due to 14 previous errors
2023-09-13 16:04:42 +00:00
For more information about this error, try `rustc --explain E0379`.