mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
14 lines
357 B
Rust
14 lines
357 B
Rust
unsafe extern "C" {
|
|
//~^ ERROR extern block cannot be declared unsafe
|
|
}
|
|
|
|
// We can't gate `unsafe extern` blocks themselves since they were previously
|
|
// allowed, but we should gate the `safe` soft keyword.
|
|
#[cfg(any())]
|
|
unsafe extern "C" {
|
|
safe fn foo();
|
|
//~^ ERROR `unsafe extern {}` blocks and `safe` keyword are experimental
|
|
}
|
|
|
|
fn main() {}
|