rust/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
313 B
Rust
Raw Normal View History

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