summaryrefslogtreecommitdiffstats
path: root/tests/ui/consts/issue-18294.rs
blob: 77355f0d7c994423a142ceeb4cf87963def7cbcd (plain)
1
2
3
4
5
fn main() {
    const X: u32 = 1;
    const Y: usize = unsafe { &X as *const u32 as usize }; //~ ERROR pointers cannot be cast to integers
    println!("{}", Y);
}