Fix example for non-x86 targets

This commit is contained in:
Eric Huss 2023-02-28 08:55:25 -08:00
parent 33d68e1c92
commit 650dd01892
1 changed files with 2 additions and 0 deletions

View File

@ -17,6 +17,7 @@ The compiler will emit an error if `asm!` is used on an unsupported target.
## Example
```rust
# #[cfg(target_arch = "x86_64")] {
use std::arch::asm;
// Multiply x by 6 using shifts and adds
@ -32,6 +33,7 @@ unsafe {
);
}
assert_eq!(x, 4 * 6);
# }
```
## Syntax