diff options
Diffstat (limited to 'tests/ui/asm/global-asm-with-error.rs')
| -rw-r--r-- | tests/ui/asm/global-asm-with-error.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/asm/global-asm-with-error.rs b/tests/ui/asm/global-asm-with-error.rs new file mode 100644 index 00000000000..c2253e3cb87 --- /dev/null +++ b/tests/ui/asm/global-asm-with-error.rs @@ -0,0 +1,11 @@ +// Ensure that we don't ICE when constructing the fake MIR body for a global +// asm when the body has errors. See #137470. + +//@ needs-asm-support + +use std::arch::global_asm; + +global_asm!("/* {} */", sym a); +//~^ ERROR cannot find value `a` in this scope + +fn main() {} |
