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 {
|
|
|
|
| ^^^^^^
|
2024-06-29 02:13:33 +00:00
|
|
|
|
|
|
|
|
= note: see issue #123743 <https://github.com/rust-lang/rust/issues/123743> for more information
|
|
|
|
= help: add `#![feature(unsafe_extern_blocks)]` to the crate attributes to enable
|
|
|
|
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
|
2024-05-31 19:57:07 +00:00
|
|
|
|
|
|
|
error: items in unadorned `extern` blocks cannot have safety qualifiers
|
|
|
|
--> $DIR/unsafe-foreign-mod-2.rs:4:5
|
|
|
|
|
|
|
|
|
LL | unsafe fn foo();
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
2022-05-30 07:56:43 +00:00
|
|
|
|