rust/tests/ui/rust-2024/safe-outside-extern.ungated.stderr
2024-07-18 18:02:29 -04:00

90 lines
3.4 KiB
Plaintext

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;
| ^^^^^^^^^^^^^^^^^^^^^^^^
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[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
--> $DIR/safe-outside-extern.rs:4:1
|
LL | safe fn foo() {}
| ^^^^
|
= 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
error[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
--> $DIR/safe-outside-extern.rs:8:1
|
LL | safe static FOO: i32 = 1;
| ^^^^
|
= 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
error[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
--> $DIR/safe-outside-extern.rs:13:5
|
LL | safe fn foo();
| ^^^^
|
= 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
error[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
--> $DIR/safe-outside-extern.rs:19:5
|
LL | safe fn foo() {}
| ^^^^
|
= 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
error[E0658]: `unsafe extern {}` blocks and `safe` keyword are experimental
--> $DIR/safe-outside-extern.rs:24:14
|
LL | type FnPtr = safe fn(i32, i32) -> i32;
| ^^^^
|
= 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
error: aborting due to 11 previous errors
For more information about this error, try `rustc --explain E0658`.