Skip to content

Commit f9dc099

Browse files
committed
Minor update of naked
More closely align with the template, and some minor word tweaks.
1 parent 36d52fc commit f9dc099

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/attributes/codegen.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ r[attributes.codegen.cold]
4646
The *`cold` [attribute]* suggests that the attributed function is unlikely to
4747
be called.
4848

49+
<!-- template:attributes -->
4950
r[attributes.codegen.naked]
5051
## The `naked` attribute
5152

@@ -72,7 +73,7 @@ The *`naked` [attribute]* prevents the compiler from emitting a function prologu
7273
> ```
7374
7475
r[attributes.codegen.naked.syntax]
75-
The `naked` attribute uses the [MetaWord] syntax and thus does not take any inputs.
76+
The `naked` attribute uses the [MetaWord] syntax.
7677
7778
r[attributes.codegen.naked.allowed-positions]
7879
The `naked` attribute may only be applied to:
@@ -83,10 +84,10 @@ The `naked` attribute may only be applied to:
8384
- [Trait definition functions][items.traits] with a body
8485
8586
r[attributes.codegen.naked.duplicates]
86-
Duplicate instances of the `naked` attribute have no effect.
87+
The `naked` attribute may be used any number of times on a form.
8788
8889
> [!NOTE]
89-
> `rustc` currently warns on subsequent duplicate `naked` attributes.
90+
> `rustc` lints against any use following the first.
9091
9192
r[attributes.codegen.naked.unsafe]
9293
The `naked` attribute must be marked with [`unsafe`][attributes.safety] because the body must respect the function's calling convention, uphold its signature, and either return or diverge (i.e., not fall through past the end of the assembly code).

0 commit comments

Comments
 (0)