mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
12 lines
210 B
Rust
12 lines
210 B
Rust
//@ run-pass
|
|
|
|
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 ); }
|
|
}
|