mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
13 lines
265 B
Rust
13 lines
265 B
Rust
//@ pp-exact
|
|
#![feature(raw_ref_op)]
|
|
|
|
const C_PTR: () = { let a = 1; &raw const a; };
|
|
static S_PTR: () = { let b = false; &raw const b; };
|
|
|
|
fn main() {
|
|
let x = 123;
|
|
let mut y = 345;
|
|
let c_p = &raw const x;
|
|
let parens = unsafe { *(&raw mut (y)) };
|
|
}
|