rust/tests/ui/parser/unsafe-foreign-mod-2.stderr

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

26 lines
596 B
Plaintext
Raw Normal View History

error: expected `{`, found keyword `unsafe`
--> $DIR/unsafe-foreign-mod-2.rs:1:12
|
LL | extern "C" unsafe {
| ^^^^^^ expected `{`
2024-05-31 19:57:07 +00:00
error: extern block cannot be declared unsafe
--> $DIR/unsafe-foreign-mod-2.rs:1:12
|
LL | extern "C" unsafe {
| ^^^^^^
error: items in unadorned `extern` blocks cannot have safety qualifiers
--> $DIR/unsafe-foreign-mod-2.rs:4:5
|
LL | unsafe fn foo();
| ^^^^^^^^^^^^^^^^
|
help: add unsafe to this `extern` block
|
LL | unsafe extern "C" unsafe {
| ++++++
2024-05-31 19:57:07 +00:00
error: aborting due to 3 previous errors