Closed
Description
Consider:
core::arch::global_asm!("x: .byte 42");
//
(Note: the //
line is important)
RUSTC_BOOTSTRAP=1 rustc --edition=2021 --crate-type rlib -Zunpretty=expanded a.rs > a.rsi
This generates lines like:
global_asm! ("x: .byte 42")
//
(See related issue #101047 for the lack of semicolon and path).
However, removing the comment line:
core::arch::global_asm!("x: .byte 42");
Makes the global_asm!
disappear in the output.
I have also observed similar problems with whitespace, e.g.:
core::arch::global_asm!(r#"
.globl f
f:
ret
"#);
vs.
core::arch::global_asm!(r#"
.globl f
f:
ret
"#);
Meta
Reproduces in both stable (1.63.0) and nightly.