Skip to content

We should only set deny(warnings) in doctests when deny-warnings = false #142151

Open
@RalfJung

Description

@RalfJung

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:

test(no_crate_inject, attr(deny(warnings))),

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-libsRelevant to the library team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions