2014-03-21 20:05:05 -05:00
|
|
|
#![deny(unreachable_code)]
|
|
|
|
#![allow(dead_code)]
|
2013-12-08 01:55:27 -06:00
|
|
|
|
2013-09-29 16:46:23 -05:00
|
|
|
use std::ptr;
|
|
|
|
pub unsafe fn g() {
|
2014-02-05 16:33:10 -06:00
|
|
|
return;
|
2013-09-29 16:46:23 -05:00
|
|
|
if *ptr::null() {}; //~ ERROR unreachable
|
2021-07-20 22:23:22 -05:00
|
|
|
//~| WARNING dereferencing a null pointer
|
2013-09-29 16:46:23 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
pub fn main() {}
|