blob: ab3769b06cbe385f065de46cc193d4d4a5f90d6d [file] [log] [blame] [edit]
#![forbid(unsafe_code)]
#![feature(allow_internal_unsafe)]
#[allow_internal_unsafe]
//~^ ERROR: `allow_internal_unsafe` allows defining
macro_rules! evil {
($e:expr) => {
unsafe {
$e
}
}
}
fn main() {
println!("{}", evil!(*(0 as *const u8)));
//~^ ERROR dereferencing a null pointer
}