-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
I tried this code:
pub trait Trait {
fn f();
}
impl<T> Trait for T {
fn f() {}
}
pub mod inner {
use crate::Trait;
/// Link to [S::f]
pub struct S;
}
I expected to see this happen: The link resolves to <S as Trait>::f
Instead, this happened: rustdoc can't resolve the link:
warning: unresolved link to `S::f`
--> blanket.rs:10:18
|
10 | /// Link to [S::f]
| ^^^^ the struct `S` has no field or associated item named `f`
|
= note: `#[warn(broken_intra_doc_links)]` on by default
Meta
rustdoc +nightly --version
: rustdoc 1.49.0-nightly (ffa2e7ae8 2020-10-24)
cc @seeplusplus
After seeing #78761 I'm strongly considering getting rid of blanket impls altogether, clearly no one has been using them or they would have opened an issue. @Manishearth what do you think?
Metadata
Metadata
Assignees
Labels
A-intra-doc-linksArea: Intra-doc links, the ability to link to items in docs by nameArea: Intra-doc links, the ability to link to items in docs by nameA-trait-systemArea: Trait systemArea: Trait systemC-bugCategory: This is a bug.Category: This is a bug.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.