rust/src/test/ui/issues/issue-7246.rs
2018-12-25 21:08:33 -07:00

11 lines
161 B
Rust

#![deny(unreachable_code)]
#![allow(dead_code)]
use std::ptr;
pub unsafe fn g() {
return;
if *ptr::null() {}; //~ ERROR unreachable
}
pub fn main() {}