2022-05-30 07:56:43 +00:00
|
|
|
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();
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
2024-06-26 00:44:59 +00:00
|
|
|
|
|
|
|
|
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
|
2022-05-30 07:56:43 +00:00
|
|
|
|