Closed
Description
The pretty printer is removing trailing commas from match arms that contain an unsafe { ... }
block expression:
#![allow(unused_unsafe)]
fn main() {
let _ = match true {
true => unsafe { true },
false => false,
};
}
Running it with rustc --pretty normal test.rs
produces:
#![allow(unused_unsafe)]
fn main() { let _ = match true { true => unsafe { true } false => false, }; }
Which when compiled errors with:
test2.rs:3:58: 3:63 error: expected one of `,`, `}`, found `false`
test2.rs:3 fn main() { let _ = match true { true => unsafe { true } false => false, }; }
^~~~~