-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustdoc: Add more semantic information to impl IDs #92745
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
@rustbot author |
This comment has been minimized.
This comment has been minimized.
r? @camelid |
@rustbot ready |
Can you update the tests? @rustbot author |
Should |
No, you'll need to update the |
I'm getting panics on at least one test that has no
|
Hmm, try |
Still getting nasty panics. 😬 |
Weird, what's your |
|
Oh, I'm curious, why did you enable it? Did you see it recommended somewhere? |
This comment has been minimized.
This comment has been minimized.
@@ -14,4 +14,4 @@ press-key: "Enter" | |||
// Waiting for the search results to appear... | |||
wait-for: "#titles" | |||
// We check that there is no more "test_docs" appearing. | |||
assert-false: "#results .externcrate" | |||
// assert-false: "#results .externcrate" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how we want to handle this. @GuillaumeGomez
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the result appears, then it means the search filter is broken. Try to do on your browser what it's doing in this and you should see pretty quickly what's wrong. If you can't figure it out, I can take a look in the next days.
Please revert this change in any case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
a928fc0
to
cd4813c
Compare
This comment has been minimized.
This comment has been minimized.
Ok, now you're seeing all the broken links in the standard library 😅 Before you go to the effort to update all of those, we should get confirmation from the team that this new anchor formatting looks good to them. |
I said it on zulip but doesn't hurt to say it here as well: I agree with this change (good luck updating all std URLs 😉 ). |
@rustbot author |
I've put up a demo of this branch at https://rustdoc.crud.net/jsha/rustdoc-disamb-impls/std/fs/struct.File.html#impl-AsFd-for-File (@pierwill, if you'd like an account on this server so you can upload demos, PM me on Zulip! I'm @jsha there too). I spotted the broken links issue. If you look in the sidebar for I think this is the code you need to tweak: rust/src/librustdoc/html/render/mod.rs Lines 2012 to 2033 in 48e89b0
|
cd4813c
to
a6f6b2f
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I do still want to finish this. 🤓 |
Instead of generating `#impl`, `#impl-1`, etc., generate IDs like `#impl-Foo<M>`. Co-authored-by: Noah Lev <camelidcamel@gmail.com>
604b874
to
083cf2a
Compare
☔ The latest upstream changes (presumably #93655) made this pull request unmergeable. Please resolve the merge conflicts. |
…, r=notriddle rustdoc: Add more semantic information to impl IDs Take over of rust-lang#92745. I fixed the last remaining issue for the links in the sidebar (mentioned by `@jsha)` and fixed the few links broken in the std/core docs. cc `@camelid` r? `@notriddle`
Instead of generating
#impl
,#impl-1
, etc., generate IDs like#impl-Foo<M>
.Part of #92052.