summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lint/unsafe_code/forge_unsafe_block.rs
blob: a1bd7b4131984aecf5ced621aace3a2bf7572688 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// 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();
    }
}