Skip to content

rustdoc does not forward lint settings to the doctest builds #142149

Open
@RalfJung

Description

@RalfJung

TIL that while a bunch of flags are forwarded to doctests builds (including --cfg and --check-cfg), this is not true for --cap-lints as well as -A/-D and the other lint flags. This caught me by surprise when I tried to suppress a deny(warnings) in a doctest. See Zulip for the surrounding discussion.

Would it make sense to also forward the lint flags to the test build? That would seem to make things more consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-doctestsArea: Documentation tests, run by rustdocA-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.needs-fcpThis change is insta-stable, or significant enough to need a team FCP to proceed.

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions