Skip to content

Commit 18c7807

Browse files
joshtriplettnbdd0121
authored andcommitted
Clarify an interaction between noreturn and label
1 parent 230d8ff commit 18c7807

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/inline-assembly.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1096,7 +1096,7 @@ r[asm.options.supported-options.preserves_flags]
10961096
r[asm.options.supported-options.noreturn]
10971097
- `noreturn`: The assembly code never returns, and its return type is defined as `!` (never).
10981098
Behavior is undefined if execution falls through past the end of the asm code.
1099-
A `noreturn` asm block behaves just like a function which doesn't return; notably, local variables in scope are not dropped before it is invoked.
1099+
A `noreturn` asm block with no `label` blocks behaves just like a function which doesn't return; notably, local variables in scope are not dropped before it is invoked.
11001100
- When any `label` blocks are present, `noreturn` means the execution of the assembly code never falls through; the assembly code may only exit by jumping to one of the specified blocks.
11011101
The entire `asm!` block will have unit type in this case, unless all `label` blocks diverge, in which case the return type is `!`.
11021102

0 commit comments

Comments
 (0)