Skip to content

Commit 5ba6736

Browse files
committed
Move asm! noreturn + output example to correct location
1 parent ff6252f commit 5ba6736

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/inline-assembly.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,9 +1210,6 @@ unsafe { core::arch::asm!("", options(pure)); }
12101210
r[asm.options.checks.noreturn]
12111211
- It is a compile-time error to specify `noreturn` on an asm block with outputs and without labels.
12121212

1213-
r[asm.options.checks.label-with-outputs]
1214-
- It is a compile-time error to have any `label` blocks in an asm block with outputs.
1215-
12161213
```rust,compile_fail
12171214
# #[cfg(target_arch = "x86_64")] {
12181215
let z: i32;
@@ -1223,6 +1220,9 @@ unsafe { core::arch::asm!("mov {:e}, 1", out(reg) z, options(noreturn)); }
12231220
# #[cfg(not(target_arch = "x86_64"))] core::compile_error!("Test not supported on this arch");
12241221
```
12251222

1223+
r[asm.options.checks.label-with-outputs]
1224+
- It is a compile-time error to have any `label` blocks in an asm block with outputs.
1225+
12261226
r[asm.options.naked_asm-restriction]
12271227
`naked_asm!` only supports the `att_syntax` and `raw` options. The remaining options are not meaningful because the inline assembly defines the whole function body.
12281228

0 commit comments

Comments
 (0)