We should only set `deny(warnings)` in doctests when `deny-warnings = false`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
deny(warnings) is usually not something we want to hard-code in the sources, it should only be set on CI -- otherwise lints can introduce frustrating roadblocks when they don't have to. I encountered this as part of this recent problem:
Would it be possible to set this flag inside ./x instead, and make it depend on the deny-warnings setting in bootstrap.toml? That would make it more consistent with the main crate builds as well. It seems this could be achieved by setting RUSTDOCFLAGS="--doctest-build-arg -D warnings -Zunstable-options".
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 with the deny(warnings) setting in library/core/src/lib.rs, then trace how doctests are built through bootstrap.toml and ./x. Check how deny-warnings affects main crate builds and whether RUSTDOCFLAGS="--doctest-build-arg -D warnings -Zunstable-options" can be applied consistently. Done means doctests receive the flag only when configured, without hard-coding it in sources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100