mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-16 10:35:22 +00:00
14 lines
234 B
Rust
14 lines
234 B
Rust
// 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 ); }
|
|
}
|