0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-22 10:25:09 +01:00
rust/tests/pretty/raw-address-of.rs
2024-08-18 19:46:53 +02:00

12 lines
241 B
Rust

//@ pp-exact
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)) };
}