From 22327b609d7bc808c2836ba6f0e7888f73d854d3 Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Fri, 23 Oct 2026 16:52:23 -0700 Subject: [PATCH] `asm.options.global_asm-restriction`: show error output Rather than saying the option is useless --- src/inline-assembly.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inline-assembly.md b/src/inline-assembly.md index 8f7e535520..4b4af04474 100644 --- a/src/inline-assembly.md +++ b/src/inline-assembly.md @@ -1311,8 +1311,8 @@ r[asm.options.global_asm-restriction] ```rust,compile_fail # fn main() {} # #[cfg(target_arch = "x86_64")] -// nomem is useless on global_asm! core::arch::global_asm!("", options(nomem)); +// ERROR: the `nomem` option cannot be used with `global_asm!` # #[cfg(not(target_arch = "x86_64"))] core::compile_error!("Test not supported on this arch"); ```