mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
Rollup merge of #101369 - compiler-errors:global-asm-pprint, r=jackh726
Fix `global_asm` macro pretty printing Fixes #101051 Fixes #101047
This commit is contained in:
commit
a3dda51438
@ -218,6 +218,8 @@ impl<'a> State<'a> {
|
||||
ast::ItemKind::GlobalAsm(ref asm) => {
|
||||
self.head(visibility_qualified(&item.vis, "global_asm!"));
|
||||
self.print_inline_asm(asm);
|
||||
self.word(";");
|
||||
self.end();
|
||||
self.end();
|
||||
}
|
||||
ast::ItemKind::TyAlias(box ast::TyAlias {
|
||||
|
3
src/test/ui/asm/unpretty-expanded.rs
Normal file
3
src/test/ui/asm/unpretty-expanded.rs
Normal file
@ -0,0 +1,3 @@
|
||||
// check-pass
|
||||
// compile-flags: -Zunpretty=expanded
|
||||
core::arch::global_asm!("x: .byte 42");
|
9
src/test/ui/asm/unpretty-expanded.stdout
Normal file
9
src/test/ui/asm/unpretty-expanded.stdout
Normal file
@ -0,0 +1,9 @@
|
||||
#![feature(prelude_import)]
|
||||
#![no_std]
|
||||
#[prelude_import]
|
||||
use ::std::prelude::rust_2015::*;
|
||||
#[macro_use]
|
||||
extern crate std;
|
||||
// check-pass
|
||||
// compile-flags: -Zunpretty=expanded
|
||||
global_asm! ("x: .byte 42");
|
Loading…
Reference in New Issue
Block a user