Intra-doc links do not resolve associated items for blanket impls #78800
Open
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?