Lints are not produced on attributes on parameters of functions without bodies
Open
@JonathanBrouwer is already working on this.
Since Sep 12, 2026.
A-diagnostics
A-lints
C-bug
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
I tried this code:
type T = fn(#[allow()] x: usize);
I expected to see this happen: An unused_attributes lint is produced on #[allow()]
Instead, this happened: No output is produced, the code compiles
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.