2024-06-20 19:19:43 +00:00
|
|
|
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
|
|
--> $DIR/safe-outside-extern.rs:4:1
|
|
|
|
|
|
|
|
|
LL | safe fn foo() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
|
|
--> $DIR/safe-outside-extern.rs:8:1
|
|
|
|
|
|
|
|
|
LL | safe static FOO: i32 = 1;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
|
|
--> $DIR/safe-outside-extern.rs:13:5
|
|
|
|
|
|
|
|
|
LL | safe fn foo();
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: items outside of `unsafe extern { }` cannot be declared with `safe` safety qualifier
|
|
|
|
--> $DIR/safe-outside-extern.rs:19:5
|
|
|
|
|
|
|
|
|
LL | safe fn foo() {}
|
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: function pointers cannot be declared with `safe` safety qualifier
|
|
|
|
--> $DIR/safe-outside-extern.rs:24:14
|
|
|
|
|
|
|
|
|
LL | type FnPtr = safe fn(i32, i32) -> i32;
|
2024-06-17 08:47:09 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
2024-06-20 19:19:43 +00:00
|
|
|
|
2024-07-18 22:02:09 +00:00
|
|
|
error: static items cannot be declared with `unsafe` safety qualifier outside of `extern` block
|
|
|
|
--> $DIR/safe-outside-extern.rs:28:1
|
|
|
|
|
|
|
|
|
LL | unsafe static LOL: u8 = 0;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
2024-06-20 19:19:43 +00:00
|
|
|
|