summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-17458.rs
blob: 44125a1c3df8d64302f9688a81883083c73873da (plain)
1
2
3
4
5
6
static X: usize = unsafe { core::ptr::null::<usize>() as usize };
//~^ ERROR: pointers cannot be cast to integers during const eval

fn main() {
    assert_eq!(X, 0);
}