Open
Description
Test case:
mod internal {
pub struct BadName;
impl BadName {
pub fn f(&self) {}
}
}
pub use internal::BadName as GoodName;
Running rustdoc a.rs
, it produces this page:
Note that the impl
still refers to the struct as BadName
. The fix for #34473 is not enough.
Real world example:
- https://docs.rs/handlebars/5.1.0/handlebars/struct.Handlebars.html — the struct is exported as
Handlebars
but the content saysimpl Registry
. The methodnew()
also returnsRegistry
. - https://docs.rs/handlebars/5.1.0/handlebars/trait.HelperDef.html — the parameter involving
&'reg
refers toRegistry
, although it correctly links tostruct.Handlebars.html
.