-
Notifications
You must be signed in to change notification settings - Fork 13.3k
rustdoc: add "src" links to individual impls #33382
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
I'll take a look to the CSS. |
I like it! Thanks! |
@bors: r+ rollup |
📌 Commit 7a0d317 has been approved by |
@bors: r- actually, i would like @alexcrichton to also check this out; it's a relatively big diff to the internals and he knows them better than I |
impl_: i, | ||
dox: attrs.value("doc").map(|s|s.to_owned()), | ||
stability: item.stability.clone(), | ||
// FIXME: would like to move the item here, but |
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.
How come the bindings above were switched to ref
? Wouldn't that mean you can avoid the clone()
here?
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.
Without the ref
above, I can't even access item
anymore since it's been partially moved; with the ref
, I can't move it into the Impl because it's partially borrowed :)
Thanks! We've also had requests to jump to the source of a particular method itself from time to time, but only having it on impls for now seems like a nice balance between clutter and usability, so sounds like a good strategy to me. |
Since these impls can be scattered around quite a bit, it is nice to be able to jump to the location where individual methods and trait impls are defined. Fixes: rust-lang#30416
Pushed a new version with review comments addressed. |
rustdoc: add "src" links to individual impls Since these impls can be scattered around quite a bit, it is nice to be able to jump to the location where individual methods and trait impls are defined. NOTE: this needs an update to the CSS, which I'd like to leave for whoever is the "rustdoc frontend champion". The new [src] links are currently too large and bold. Also, the interaction with the "since version X" annotations is not good. Fixes: rust-lang#30416
rustdoc: add "src" links to individual impls Since these impls can be scattered around quite a bit, it is nice to be able to jump to the location where individual methods and trait impls are defined. NOTE: this needs an update to the CSS, which I'd like to leave for whoever is the "rustdoc frontend champion". The new [src] links are currently too large and bold. Also, the interaction with the "since version X" annotations is not good. Fixes: rust-lang#30416
rustdoc: add "src" links to individual impls Since these impls can be scattered around quite a bit, it is nice to be able to jump to the location where individual methods and trait impls are defined. NOTE: this needs an update to the CSS, which I'd like to leave for whoever is the "rustdoc frontend champion". The new [src] links are currently too large and bold. Also, the interaction with the "since version X" annotations is not good. Fixes: rust-lang#30416
…klabnik Update CSS for future rustdoc merge cc rust-lang#33382 r? @steveklabnik cc @Manishearth cc @birkenfeld
…klabnik Update CSS for future rustdoc merge cc rust-lang#33382 r? @steveklabnik cc @Manishearth cc @birkenfeld
…klabnik Update CSS for future rustdoc merge cc rust-lang#33382 r? @steveklabnik cc @Manishearth cc @birkenfeld
Since these impls can be scattered around quite a bit, it is nice to be able to jump to the location where individual methods and trait impls are defined.
NOTE: this needs an update to the CSS, which I'd like to leave for whoever is the "rustdoc frontend champion". The new [src] links are currently too large and bold. Also, the interaction with the "since version X" annotations is not good.
Fixes: #30416