rust/tests/pretty/raw-address-of.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
241 B
Rust
Raw Normal View History

2019-09-18 15:31:25 -05:00
//@ 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)) };
}