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
800 B
Plaintext
Raw Normal View History

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