rust/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs
2024-01-05 10:00:59 +00:00

18 lines
310 B
Rust

// edition: 2024
// compile-flags: -Zunstable-options
// check-pass
#![crate_type = "lib"]
#![deny(unused_unsafe)]
unsafe fn unsf() {}
unsafe fn foo() {
unsf();
//~^ WARN call to unsafe function `unsf` is unsafe and requires unsafe block
// no unused_unsafe
unsafe {
unsf();
}
}