Documentation example of lint warnings broken for rustc lints
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
Rustc lints have placeholder {{produces}} in examples that should generate actual warnings for documentation, but it currently not working, as can be seen on https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/let_underscore/static.LET_UNDERSCORE_DROP.html, for example; it should contain actual warning text instead of {{produces}}.
As of version presented on site:
1.76.0-nightly (a96d57bdb 2023-12-15)
Some description of how it should work: https://github.com/rust-lang/rust/blob/1c6a06183a1452c2772db370b572e38bac9c5d86/compiler/rustc_lint_defs/src/lib.rs#L769-L788
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.
Research direction
Start by reading compiler/rustc_lint_defs/src/lib.rs around lines 769-788 and compare its behavior with the generated rustc_lint documentation page for LET_UNDERSCORE_DROP. Trace how the lint example reaches the documentation output, then verify that the published example contains the actual warning text instead of {{produces}}.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100