2019-09-18 15:31:25 -05:00
|
|
|
// run-pass
|
2019-11-23 08:22:30 -06:00
|
|
|
|
|
|
|
#![feature(raw_ref_op)]
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let mut x = 123;
|
2019-09-18 15:31:25 -05:00
|
|
|
let c_p = &raw const x;
|
|
|
|
let m_p = &raw mut x;
|
2019-11-23 08:22:30 -06:00
|
|
|
let i_r = &x;
|
|
|
|
assert!(c_p == i_r);
|
|
|
|
assert!(c_p == m_p);
|
|
|
|
unsafe { assert!(*c_p == *i_r ); }
|
|
|
|
}
|