blob: 06a46b9812d38b4391c9c1bfcda3020bbf7d26cd [file] [log] [blame]
//@ edition: 2024
//@ compile-flags: -Zunstable-options
//@ check-pass
// Tests that `unsafe_op_in_unsafe_fn` is warn-by-default in edition 2024 and that the
// `unused_unsafe` lint does not consider the inner unsafe block to be unused.
#![crate_type = "lib"]
#![deny(unused_unsafe)]
unsafe fn unsf() {}
unsafe fn foo() {
unsf();
//~^ WARN
// no unused_unsafe
unsafe {
unsf();
}
}