rust/tests/ui/rust-2024/unsafe-extern-blocks/safe-unsafe-on-unadorned-extern-block.edition2021.stderr

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

25 lines
659 B
Plaintext
Raw Normal View History

2024-10-11 10:24:14 -05:00
error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
--> $DIR/safe-unsafe-on-unadorned-extern-block.rs:8:5
|
LL | safe static TEST1: i32;
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-11 10:24:14 -05:00
help: add `unsafe` to this `extern` block
|
LL | unsafe extern "C" {
| ++++++
2024-10-11 10:24:14 -05:00
error: items in `extern` blocks without an `unsafe` qualifier cannot have safety qualifiers
--> $DIR/safe-unsafe-on-unadorned-extern-block.rs:10:5
|
LL | safe fn test1(i: i32);
| ^^^^^^^^^^^^^^^^^^^^^^
|
2024-10-11 10:24:14 -05:00
help: add `unsafe` to this `extern` block
|
LL | unsafe extern "C" {
| ++++++
error: aborting due to 2 previous errors