Skip to content

Commit 8eda943

Browse files
RalfJungAmanieu
andauthored
adjust wording
Co-authored-by: Amanieu d'Antras <[email protected]>
1 parent ed33f75 commit 8eda943

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/inline-assembly.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,7 @@ The list of clobbered registers for each ABI is updated in rustc as architecture
412412

413413
Flags are used to further influence the behavior of the inline assembly block.
414414
Currently the following options are defined:
415-
- `pure`: The `asm!` block has no side effects, and its outputs depend only on its direct inputs (i.e. the values themselves, not what they point to) or values read from memory (unless the `nomem` options is also set).
416-
The `asm!` block must always terminate.
415+
- `pure`: The `asm!` block has no side effects, must eventually return, and its outputs depend only on its direct inputs (i.e. the values themselves, not what they point to) or values read from memory (unless the `nomem` options is also set).
417416
This allows the compiler to execute the `asm!` block fewer times than specified in the program (e.g. by hoisting it out of a loop) or even eliminate it entirely if the outputs are not used.
418417
The `pure` option must be combined with either the `nomem` or `readonly` options, otherwise a compile-time error is emitted.
419418
- `nomem`: The `asm!` blocks does not read or write to any memory.

0 commit comments

Comments
 (0)