File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,23 @@ The *`naked` [attribute]* prevents the compiler from emitting a function prologu
7171> # }
7272> ```
7373
74+ r [attributes . codegen. naked. syntax]
75+ The `naked ` attribute uses the [MetaWord ] syntax and thus does not take any inputs .
76+
77+ r [attributes . codegen. naked. allowed- positions ]
78+ The `naked ` attribute may only be applied to :
79+
80+ - [Free functions ][items . fn ]
81+ - [Inherent associated functions ][items . associated. fn ]
82+ - [Trait impl functions ][items . impl . trait ]
83+ - [Trait definition functions ][items . traits] with a body
84+
85+ r [attributes . codegen. naked. duplicates]
86+ Duplicate instances of the `naked ` attribute have no effect .
87+
88+ > [! NOTE ]
89+ > `rustc ` currently warns on subsequent duplicate `naked ` attributes .
90+
7491r [attributes . codegen. naked. body]
7592The [function body ] must consist of exactly one [`naked_asm! `] macro invocation .
7693
You can’t perform that action at this time.
0 commit comments