Skip to content

rustdoc: only show intra_doc_link_resolution_failure lints for items being documented #51684

Closed
@QuietMisdreavus

Description

@QuietMisdreavus
Member

One thing i noticed about this lint is that it's firing for items that aren't even being exported. For example, in this build log, there are a lot of repeat hits for the cfg_if! macro, even though i would not expect all of these crates to be re-exporting the macro. In one particular situation, it seems to have caused a crate with #![deny(warnings)] on it to fail to build, just because of this dependency! We should probably wait to emit these lints until the passes which strip items have been run, to reduce some of these erroneous reports.

Activity

added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
on Jun 21, 2018
QuietMisdreavus

QuietMisdreavus commented on Jun 21, 2018

@QuietMisdreavus
MemberAuthor

cc @GuillaumeGomez since you implemented both the lint and the warning that preceded it.

QuietMisdreavus

QuietMisdreavus commented on Jun 21, 2018

@QuietMisdreavus
MemberAuthor

cc #43466 as well since it's an intra-doc-link problem

added
C-bugCategory: This is a bug.
and removed
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
on Jun 23, 2018
clarfonthey

clarfonthey commented on Jul 8, 2018

@clarfonthey
Contributor

Just ran into this. I would like to see these capped to warn like they are normally for lints on dependency crates, rather than preventing a doc build on my crate for something I can't control.

GuillaumeGomez

GuillaumeGomez commented on Jul 8, 2018

@GuillaumeGomez
Member

You can now play with cap-lints with rustdoc just like you would with rustc. However, this issue is a separate problem which needs to be fixed on its own.

nrc

nrc commented on Jul 18, 2018

@nrc
Member

It would be good, I think, to automatically suppress this lint for all dependent crates by default.

Perhaps off-topic, but this lint seems to be firing a lot for some crates (crossbeam, regex, and (I think) std). Many of these look like markdown links, which presumably we should not be firing the lint for?

QuietMisdreavus

QuietMisdreavus commented on Jul 28, 2018

@QuietMisdreavus
MemberAuthor

It took a bit of a refactor, but i've posted #52800 to solve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-rustdocRelevant to the rustdoc 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

        Participants

        @nrc@GuillaumeGomez@QuietMisdreavus@clarfonthey

        Issue actions

          rustdoc: only show `intra_doc_link_resolution_failure` lints for items being documented · Issue #51684 · rust-lang/rust