Files
rust/tests/ui/parser/no-const-fn-in-extern-block.stderr

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

31 lines
850 B
Plaintext
Raw Normal View History

2024-10-11 11:30:03 -04:00
error: functions in `extern` blocks cannot have `const` qualifier
--> $DIR/no-const-fn-in-extern-block.rs:2:5
|
2020-09-01 17:12:52 -04:00
LL | extern "C" {
| ---------- in this `extern` block
LL | const fn foo();
2024-10-11 11:30:03 -04:00
| ^^^^^ help: remove the `const` qualifier
2024-10-11 11:30:03 -04:00
error: functions in `extern` blocks cannot have `const` qualifier
--> $DIR/no-const-fn-in-extern-block.rs:4:5
|
LL | extern "C" {
| ---------- in this `extern` block
...
LL | const unsafe fn bar();
2024-10-11 11:30:03 -04:00
| ^^^^^ help: remove the `const` qualifier
2024-10-11 11:24:14 -04:00
error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
--> $DIR/no-const-fn-in-extern-block.rs:4:5
|
LL | const unsafe fn bar();
| ^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-11 11:24:14 -04:00
help: add `unsafe` to this `extern` block
|
LL | unsafe extern "C" {
| ++++++
error: aborting due to 3 previous errors