2023-05-27 06:00:51 -05:00
|
|
|
// 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
|
2023-05-27 06:00:51 -05:00
|
|
|
|
|
|
|
// no unused_unsafe
|
2023-10-26 10:39:25 -05:00
|
|
|
unsafe {
|
|
|
|
unsf();
|
|
|
|
}
|
2023-05-27 06:00:51 -05:00
|
|
|
}
|