rustdoc: links from items in a trait impl are inconsistent#83068
rustdoc: links from items in a trait impl are inconsistent#83068bors merged 8 commits intorust-lang:masterfrom
Conversation
|
Some changes occurred in HTML/CSS/JS. |
|
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Looks good to me, thanks! Can you add a test in |
|
test added 👍 |
There was a problem hiding this comment.
I'm lost here: what's the point of testing that this exists on the trait when we're currently on a trait implementation on a type?
There was a problem hiding this comment.
this is on the struct impl for the trait on the trait doc page. the method.defaulted_override-3 is targeting the impl, not the trait itself
There was a problem hiding this comment.
Apparently not because the href you test is "#method.defaulted_override".
There was a problem hiding this comment.
oh right, in the h4 with id method.defaulted_override-3, there is now the function name (class fnname that links to it's trait definition, so #method.defaulted_override, and anchor (class anchor) that links to itself (the line under this one)
this pr makes it so that every item in a trait impl is that way
There was a problem hiding this comment.
That part makes sense, but why are you testing that on the trait page whereas we "are" (so to speak) on the type?
There was a problem hiding this comment.
as the type implements the trait, it is present on both page
|
☔ The latest upstream changes (presumably #82873) made this pull request unmergeable. Please resolve the merge conflicts. |
|
ping @GuillaumeGomez - this is waiting on your review. @mockersf do you mind fixing the merge conflict in the meantime? |
|
Still in my review list. :) |
76a49ca to
7f39530
Compare
This comment has been minimized.
This comment has been minimized.
fixed! |
|
Thanks! @bors: r+ |
|
📌 Commit e36ca09 has been approved by |
|
☀️ Test successful - checks-actions |
Depending on where the struct implementing a trait is coming from, or the current page, the items in a trait impl are not linking to the same thing:
rust code with those cases
In this PR, I fixed all links to target the trait definition, and added an anchor-link to the current implementation appearing on mouse hover.