Skip to content

Commit a2c50de

Browse files
committed
Minor update of naked
More closely align with the template, and some minor word tweaks.
1 parent 9c41721 commit a2c50de

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
@@ -119,6 +119,7 @@ Only the first use of `cold` on a function has effect.
119119
r[attributes.codegen.cold.trait]
120120
When `cold` is applied to a function in a [trait], it applies only to the code of the [default definition].
121121
122+
<!-- template:attributes -->
122123
r[attributes.codegen.naked]
123124
## The `naked` attribute
124125
@@ -145,7 +146,7 @@ The *`naked` [attribute]* prevents the compiler from emitting a function prologu
145146
> ```
146147
147148
r[attributes.codegen.naked.syntax]
148-
The `naked` attribute uses the [MetaWord] syntax and thus does not take any inputs.
149+
The `naked` attribute uses the [MetaWord] syntax.
149150
150151
r[attributes.codegen.naked.allowed-positions]
151152
The `naked` attribute may only be applied to:
@@ -156,10 +157,10 @@ The `naked` attribute may only be applied to:
156157
- [Trait definition functions][items.traits] with a body
157158
158159
r[attributes.codegen.naked.duplicates]
159-
Duplicate instances of the `naked` attribute have no effect.
160+
The `naked` attribute may be used any number of times on a form.
160161
161162
> [!NOTE]
162-
> `rustc` currently warns on subsequent duplicate `naked` attributes.
163+
> `rustc` lints against any use following the first.
163164
164165
r[attributes.codegen.naked.unsafe]
165166
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)