summaryrefslogtreecommitdiffstats
path: root/tests/ui/raw-ref-op/raw-ref-op.rs
blob: 0c6e23a00d52501e7b89c0b248e72a1008789707 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// run-pass

#![feature(raw_ref_op)]

fn main() {
    let mut x = 123;
    let c_p = &raw const x;
    let m_p = &raw mut x;
    let i_r = &x;
    assert!(c_p == i_r);
    assert!(c_p == m_p);
    unsafe { assert!(*c_p == *i_r ); }
}