Intra-doc diagnostics are wrong with a disambiguator that's not in the value namespace #76925
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-intra-doc-links
Area: Intra-doc links, the ability to link to items in docs by name
C-bug
Category: This is a bug.
D-incorrect
Diagnostics: A diagnostic that is giving misleading or incorrect information.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
I tried this code:
I expected to the same diagnostic as without a disambiguator:
Instead, rustdoc gave a diagnostic that made no sense:
Meta
rustc --version --verbose
:Relevant code:
rust/src/librustdoc/passes/collect_intra_doc_links.rs
Lines 209 to 230 in 8a13fc4
The issue is that
variant_field
is only called for the value namespace, but it's in charge of giving diagnostics for intermediate paths. That logic should instead be moved tofn resolution_failure
.The text was updated successfully, but these errors were encountered: