rust/tests/ui/lint/unsafe_code/forge_unsafe_block.rs
2023-01-11 09:32:08 +00:00

17 lines
304 B
Rust

// check-pass
// aux-build:forge_unsafe_block.rs
#[macro_use]
extern crate forge_unsafe_block;
unsafe fn foo() {}
#[forbid(unsafe_code)]
fn main() {
// `forbid` doesn't work for non-user-provided unsafe blocks.
// see `UnsafeCode::check_expr`.
forge_unsafe_block! {
foo();
}
}