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.

160 lines
5.0 KiB
Plaintext
Raw Normal View History

error: functions cannot be both `const` and `async`
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:10: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
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:16: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
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:18: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`
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:18: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
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:27: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
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:29: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`
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:29: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`
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:39:9
|
LL | const async unsafe extern "C" fn fi5() {}
| ^^^^^-^^^^^------------------------------
| | |
| | `async` because of this
| `const` because of this
2024-10-11 15:30:03 +00:00
error: functions in `extern` blocks cannot have `async` qualifier
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:44:9
|
2020-09-01 21:12:52 +00:00
LL | extern "C" {
| ---------- in this `extern` block
LL | async fn fe1();
2024-10-11 15:30:03 +00:00
| ^^^^^ help: remove the `async` qualifier
2024-10-11 15:24:14 +00:00
error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:45:9
|
LL | unsafe fn fe2();
| ^^^^^^^^^^^^^^^^
|
2024-10-11 15:24:14 +00:00
help: add `unsafe` to this `extern` block
|
LL | unsafe extern "C" {
| ++++++
2024-10-11 15:30:03 +00:00
error: functions in `extern` blocks cannot have `const` qualifier
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:46:9
|
2020-09-01 21:12:52 +00:00
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const fn fe3();
2024-10-11 15:30:03 +00:00
| ^^^^^ help: remove the `const` qualifier
2024-10-11 15:30:03 +00:00
error: functions in `extern` blocks cannot have `extern` qualifier
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:47:9
|
2020-09-01 21:12:52 +00:00
LL | extern "C" {
| ---------- in this `extern` block
...
LL | extern "C" fn fe4();
2024-10-11 15:30:03 +00:00
| ^^^^^^^^^^ help: remove the `extern` qualifier
2024-10-11 15:30:03 +00:00
error: functions in `extern` blocks cannot have `async` qualifier
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:48:15
|
2020-09-01 21:12:52 +00:00
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const async unsafe extern "C" fn fe5();
2024-10-11 15:30:03 +00:00
| ^^^^^ help: remove the `async` qualifier
2024-10-11 15:30:03 +00:00
error: functions in `extern` blocks cannot have `const` qualifier
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:48:9
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const async unsafe extern "C" fn fe5();
2024-10-11 15:30:03 +00:00
| ^^^^^ help: remove the `const` qualifier
2024-10-11 15:30:03 +00:00
error: functions in `extern` blocks cannot have `extern` qualifier
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:48:28
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const async unsafe extern "C" fn fe5();
2024-10-11 15:30:03 +00:00
| ^^^^^^^^^^ help: remove the `extern` qualifier
2024-10-11 15:24:14 +00:00
error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:48:9
|
LL | const async unsafe extern "C" fn fe5();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-11 15:24:14 +00:00
help: add `unsafe` to this `extern` block
|
LL | unsafe extern "C" {
| ++++++
error: functions cannot be both `const` and `async`
2024-08-29 13:33:34 +00:00
--> $DIR/fn-header-semantic-fail.rs:48:9
|
LL | const async unsafe extern "C" fn fe5();
| ^^^^^-^^^^^----------------------------
| | |
| | `async` because of this
| `const` because of this
error: aborting due to 17 previous errors
2023-09-13 16:04:42 +00:00
For more information about this error, try `rustc --explain E0379`.