mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
18 lines
313 B
Rust
18 lines
313 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();
|
|
}
|
|
}
|