Files
rust/tests/ui/unpretty/exhaustive-asm.expanded.stdout
T
Nicholas Nethercote 3f842e51a6 Improve coverage of HIR pretty printing.
By taking the existing `expanded-exhaustive.rs` test and running it with
both `Zunpretty=expanded` *and* `Zunpretty=hir`.

Also rename some files, and split the asm parts out so they only run on
x86-64.
2025-05-02 12:41:02 +10:00

34 lines
736 B
Plaintext

#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2024::*;
#[macro_use]
extern crate std;
//@ revisions: expanded hir
//@[expanded]compile-flags: -Zunpretty=expanded
//@[expanded]check-pass
//@[hir]compile-flags: -Zunpretty=hir
//@[hir]check-pass
//@ edition:2024
//@ only-x86_64
//
// asm parts of exhaustive.rs. Separate because we only run this on x86_64.
mod expressions {
/// ExprKind::InlineAsm
fn expr_inline_asm() {
let x;
asm!("mov {1}, {0}\nshl {1}, 1\nshl {0}, 2\nadd {0}, {1}",
inout(reg)
x,
out(reg)
_);
}
}
mod items {
/// ItemKind::GlobalAsm
mod item_global_asm {
global_asm! (".globl my_asm_func");
}
}