mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
26 lines
596 B
Plaintext
26 lines
596 B
Plaintext
error: expected `{`, found keyword `unsafe`
|
|
--> $DIR/unsafe-foreign-mod-2.rs:1:12
|
|
|
|
|
LL | extern "C" unsafe {
|
|
| ^^^^^^ expected `{`
|
|
|
|
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 {
|
|
| ++++++
|
|
|
|
error: aborting due to 3 previous errors
|
|
|