We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Input:
#![feature(raw_ref_op)] fn main() { let x: i32 = 0; let _ = &raw const x as *const u32; let mut y: i32 = 0; let _ = &raw mut y as *mut u32; }
Output:
#![feature(raw_ref_op)] fn main() { let x: i32 = 0; let _ = &x as *const u32; let mut y: i32 = 0; let _ = &mut y as *mut u32; }
The input compiles, while the output doesn't compile giving these errors:
error[E0606]: casting `&i32` as `*const u32` is invalid error[E0606]: casting `&mut i32` as `*mut u32` is invalid
Using rustfmt 1.4.12-nightly (9f53665 2020-02-10)