mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
25 lines
615 B
Plaintext
25 lines
615 B
Plaintext
error: items in unadorned `extern` blocks cannot have safety qualifiers
|
|
--> $DIR/safe-unsafe-on-unadorned-extern-block.rs:8:5
|
|
|
|
|
LL | safe static TEST1: i32;
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: add unsafe to this `extern` block
|
|
|
|
|
LL | unsafe extern "C" {
|
|
| ++++++
|
|
|
|
error: items in unadorned `extern` blocks cannot have safety qualifiers
|
|
--> $DIR/safe-unsafe-on-unadorned-extern-block.rs:10:5
|
|
|
|
|
LL | safe fn test1(i: i32);
|
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
help: add unsafe to this `extern` block
|
|
|
|
|
LL | unsafe extern "C" {
|
|
| ++++++
|
|
|
|
error: aborting due to 2 previous errors
|
|
|