Skip to content

Commit 92b909a

Browse files
committed
Commit the compiler to disable the unused arguments lint
This solves a paper cut with naked functions that the compiler would mark all arguments as unused, forcing the developer to either disable the lint or prefix all arguments with '_'.
1 parent 9122563 commit 92b909a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

text/0000-constrained-naked.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ A naked function is identified by the `#[naked]` attribute and:
3232
In exchange for the above constraints, the compiler commits to:
3333
1. produce a clear error if any of the above requirements are violated.
3434
1. produce a clear warning if any of the above suggestions are not heeded.
35+
1. disable the unused argument lint for the function.
3536
1. never inline the function (implicit `#[inline(never)]`).
3637
1. emit no additional instructions to the function body before the `asm!()` statement.
3738

@@ -119,7 +120,7 @@ All languages represented here follow the weaker definition of naked functions:
119120

120121
# Unresolved questions
121122

122-
Due to the definition of naked functions, the arguments will always be flagged as unused. Should we consider adding `#[used]` implicitly to all arguments?
123+
All outstanding questions have been resolved.
123124

124125
# Future possibilities
125126

0 commit comments

Comments
 (0)