You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong intra-doc links to methods on type aliases #149205
Find method get_pixel -- this item links to the trait method with URL fragment https://docs.rs/image/latest/image/struct.ImageBuffer.html#tymethod.get_pixel
However, on the struct ImageMethod page, all methods have HTML anchors starting with method... not tymethod...
As a result, clicking on the method name, moves us only to the trait's documentation, but not this specific method.
Some more details about this bug: on type aliases, methods (not necessarily from traits) don't link to the correct upstream method. I wonder whether we should link to the upstream type like we currently do or to the current page method (like we do for deref). For now I'll keep the same behaviour and fix the link generation but might be worth discussing it later on.
Activity
syphar commentedon Nov 22, 2025
thi,
this looks like a rustdoc bug? @GuillaumeGomez ?
GuillaumeGomez commentedon Nov 22, 2025
Yep it is.
@WojciechMula: can you try with nightly?
GuillaumeGomez commentedon Nov 22, 2025
Asking because we recently fixed bugs around anchors recently in #148543.
syphar commentedon Nov 22, 2025
@GuillaumeGomez docs.rs is building with nightly? ;)
build also looks like it was after your fix?
https://docs.rs/crate/image/latest/builds
GuillaumeGomez commentedon Nov 22, 2025
Ah right. So still a bug (or maybe a new one). Checking that in the next days then.
[-]Wrong links to trait methods[/-][+]Wrong intra-doc links to methods on type aliases[/+]GuillaumeGomez commentedon Nov 24, 2025
Some more details about this bug: on type aliases, methods (not necessarily from traits) don't link to the correct upstream method. I wonder whether we should link to the upstream type like we currently do or to the current page method (like we do for deref). For now I'll keep the same behaviour and fix the link generation but might be worth discussing it later on.
Rollup merge of rust-lang#149274 - GuillaumeGomez:tyalias-method-link…
Rollup merge of rust-lang#149274 - GuillaumeGomez:tyalias-method-link…
Rollup merge of rust-lang#149274 - GuillaumeGomez:tyalias-method-link…
Unrolled build for #149274
Rollup merge of #149274 - GuillaumeGomez:tyalias-method-link, r=lolbi…