Skip to content

Commit 3cda654

Browse files
committed
mention incompatible attributes
1 parent 19d44ba commit 3cda654

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/attributes/codegen.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,18 @@ A naked function that makes use of registers in a way that does not conform
8686
to the specified calling convention imposes additional safety invariants on its caller,
8787
and therefore must be marked as an [unsafe function].
8888

89-
> ***Note***: a `naked_asm!` invocation may refer to registers that were not specified as operands.
90-
> for standard `asm!` this is undefined behavior, but `naked_asm!` may rely on the state of registers
91-
> as specified by the calling convention.
92-
9389
r[attributes.codegen.naked.unused-variables]
9490
The [`unused_variables`] lint is suppressed within naked functions.
9591

92+
r[attributes.codegen.naked.inline]
93+
A naked function cannot be attributed by the [`inline`](#the-inline-attribute) attribute.
94+
95+
r[attributes.codegen.naked.track_caller]
96+
A naked function cannot be attributed by the [`track_caller`](#the-track_caller-attribute) attribute.
97+
98+
r[attributes.codegen.naked.testing]
99+
A naked function cannot be attributed by [the testing attributes](../testing.md).
100+
96101
## The `no_builtins` attribute
97102

98103
r[attributes.codegen.no_builtins]

0 commit comments

Comments
 (0)