mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-25 14:13:38 +00:00
17 lines
275 B
Rust
17 lines
275 B
Rust
//@ edition: 2024
|
|
//@ 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();
|
|
}
|
|
}
|