From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/pretty/raw-address-of.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/pretty/raw-address-of.rs (limited to 'tests/pretty/raw-address-of.rs') diff --git a/tests/pretty/raw-address-of.rs b/tests/pretty/raw-address-of.rs new file mode 100644 index 000000000..6ccc434a1 --- /dev/null +++ b/tests/pretty/raw-address-of.rs @@ -0,0 +1,12 @@ +// 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)) }; +} -- cgit v1.2.3