diff options
| author | asquared31415 <34665709+asquared31415@users.noreply.github.com> | 2021-02-18 14:27:11 -0500 | 
|---|---|---|
| committer | asquared31415 <34665709+asquared31415@users.noreply.github.com> | 2021-02-18 14:27:11 -0500 | 
| commit | 12c6a12d62fda3d5d070fe3915f03154ff7c80df (patch) | |
| tree | bca07f5862f16fb7f90a79c1aa7b4502bd700a8a /src/test/ui/asm/inline-syntax.rs | |
| parent | cb2effd44e667d133e31ef334e30d10195218ce6 (diff) | |
| download | rust-12c6a12d62fda3d5d070fe3915f03154ff7c80df.tar.gz rust-12c6a12d62fda3d5d070fe3915f03154ff7c80df.zip | |
Emit error when trying to use assembler syntax directives in `asm!`
Diffstat (limited to 'src/test/ui/asm/inline-syntax.rs')
| -rw-r--r-- | src/test/ui/asm/inline-syntax.rs | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/src/test/ui/asm/inline-syntax.rs b/src/test/ui/asm/inline-syntax.rs new file mode 100644 index 00000000000..ec8ff071885 --- /dev/null +++ b/src/test/ui/asm/inline-syntax.rs @@ -0,0 +1,14 @@ +#![feature(asm, llvm_asm)] + +fn main() { + unsafe { + asm!(".intel_syntax noprefix", "nop"); + //~^ ERROR intel sytnax is the default syntax + asm!(".intel_syntax aaa noprefix", "nop"); + //~^ ERROR intel sytnax is the default syntax + asm!(".att_syntax noprefix", "nop"); + //~^ ERROR using the .att_syntax directive may cause issues + asm!(".att_syntax bbb noprefix", "nop"); + //~^ ERROR using the .att_syntax directive may cause issues + } +} | 
