Skip to content

Intro of rustc_attr_parsing::attributes::prelude regressed "canonical" paths of certain well-known compiler items in rustdoc search #145870

@fmease

Description

@fmease

Important

This is likely an instance of #124608 (solved by rust-lang/rfcs#3011). However it might be worth discussing this recent and concrete regression in isolation.

#145507 (cc @jdonszelmann) introduced rustc_attr_parsing::attributes::prelude which among other things re-exports several "important" / well-known items, namely rustc_span::{DUMMY_SP, Ident, Span, Symbol, sym} (check out https://github.com/rust-lang/rust/blob/d327d651e2583eb601978179f2ca9808f5e243bb/compiler/rustc_attr_parsing/src/attributes/prelude.rs for a complete list (NB: only focus on cross-crate re-exports, not local ones)).

rustdoc-search now considers this prelude to be the "canonical" location of these items. This means that searching for Symbol no longer renders rustc_span::span::Symbol as its first result:

Image

but rustc_attr_parsing::attributes::prelude::Symbol:

Image

To be clear, they still link to the same item, it's just no longer apparent where this item actually comes from. See also:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-cross-crate-reexportsArea: Documentation that has been re-exported from a different crateA-rustdoc-searchArea: Rustdoc's search featureC-discussionCategory: Discussion or questions that doesn't represent real issues.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.T-rustdoc-frontendRelevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions