Skip to content

Commit 34bb6d0

Browse files
committed
Cleanup docs
1 parent bb86748 commit 34bb6d0

File tree

1 file changed

+4
-2
lines changed
  • src/doc/unstable-book/src/library-features

1 file changed

+4
-2
lines changed

src/doc/unstable-book/src/library-features/asm.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ fn mul(a: u64, b: u64) -> u128 {
201201
);
202202
}
203203
204-
(hi as u128) << 64 + lo as u128
204+
((hi as u128) << 64) + lo as u128
205205
}
206206
```
207207

@@ -382,7 +382,9 @@ The macro will initially be supported only on ARM, AArch64, x86, x86-64 and RISC
382382

383383
The assembler template uses the same syntax as [format strings][format-syntax] (i.e. placeholders are specified by curly braces). The corresponding arguments are accessed in order, by index, or by name. However, implicit named arguments (introduced by [RFC #2795][rfc-2795]) are not supported.
384384

385-
As with format strings, named arguments must appear after positional arguments. Explicit register operands must appear at the end of the operand list, after any named arguments if any. Explicit register operands cannot be used by placeholders in the template string. All other operands must appear at least once in the template string, otherwise a compiler error is generated.
385+
As with format strings, named arguments must appear after positional arguments. Explicit register operands must appear at the end of the operand list, after named arguments if any.
386+
387+
Explicit register operands cannot be used by placeholders in the template string. All other named and positional operands must appear at least once in the template string, otherwise a compiler error is generated.
386388

387389
The exact assembly code syntax is target-specific and opaque to the compiler except for the way operands are substituted into the template string to form the code passed to the assembler.
388390

0 commit comments

Comments
 (0)