Skip to content

Commit ae66749

Browse files
authored
Merge pull request #1334 from ehuss/inline-assembly-x86_64
Fix example for non-x86 targets
2 parents 1f8dc72 + 650dd01 commit ae66749

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)