diff --git a/compiler/rustc_ast_lowering/src/asm.rs b/compiler/rustc_ast_lowering/src/asm.rs index 6acdfa1b5f8..1c3fae2afe7 100644 --- a/compiler/rustc_ast_lowering/src/asm.rs +++ b/compiler/rustc_ast_lowering/src/asm.rs @@ -15,7 +15,8 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> { // lowering the register contraints in this case. let asm_arch = if self.sess.opts.actually_rustdoc { None } else { self.sess.asm_arch }; if asm_arch.is_none() && !self.sess.opts.actually_rustdoc { - struct_span_err!(self.sess, sp, E0472, "asm! is unsupported on this target").emit(); + struct_span_err!(self.sess, sp, E0472, "inline assembly is unsupported on this target") + .emit(); } if asm.options.contains(InlineAsmOptions::ATT_SYNTAX) && !matches!(asm_arch, Some(asm::InlineAsmArch::X86 | asm::InlineAsmArch::X86_64)) diff --git a/src/test/ui/asm/bad-arch.rs b/src/test/ui/asm/bad-arch.rs index b491a70d1e2..3eeb76f3d00 100644 --- a/src/test/ui/asm/bad-arch.rs +++ b/src/test/ui/asm/bad-arch.rs @@ -18,9 +18,9 @@ trait Sized {} fn main() { unsafe { asm!(""); - //~^ ERROR asm! is unsupported on this target + //~^ ERROR inline assembly is unsupported on this target } } global_asm!(""); -//~^ ERROR asm! is unsupported on this target +//~^ ERROR inline assembly is unsupported on this target diff --git a/src/test/ui/asm/bad-arch.stderr b/src/test/ui/asm/bad-arch.stderr index d006320bf45..3ca5bcc707e 100644 --- a/src/test/ui/asm/bad-arch.stderr +++ b/src/test/ui/asm/bad-arch.stderr @@ -1,10 +1,10 @@ -error[E0472]: asm! is unsupported on this target +error[E0472]: inline assembly is unsupported on this target --> $DIR/bad-arch.rs:20:9 | LL | asm!(""); | ^^^^^^^^^ -error[E0472]: asm! is unsupported on this target +error[E0472]: inline assembly is unsupported on this target --> $DIR/bad-arch.rs:25:1 | LL | global_asm!("");