Skip to content

Commit 650dd01

Browse files
committed
Fix example for non-x86 targets
1 parent 33d68e1 commit 650dd01

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/inline-assembly.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The compiler will emit an error if `asm!` is used on an unsupported target.
1717
## Example
1818

1919
```rust
20+
# #[cfg(target_arch = "x86_64")] {
2021
use std::arch::asm;
2122

2223
// Multiply x by 6 using shifts and adds
@@ -32,6 +33,7 @@ unsafe {
3233
);
3334
}
3435
assert_eq!(x, 4 * 6);
36+
# }
3537
```
3638

3739
## Syntax

0 commit comments

Comments
 (0)