rust/tests/ui/rust-2024/unsafe-attributes/unsafe-attributes.rs

12 lines
291 B
Rust
Raw Permalink Normal View History

//@ revisions: edition2021 edition2024
//@[edition2021] edition:2021
//@[edition2021] check-pass
//@[edition2024] edition:2024
//@[edition2024] compile-flags: -Zunstable-options
#[no_mangle] //[edition2024]~ ERROR: unsafe attribute used without unsafe
extern "C" fn foo() {}
fn main() {}