rustdoc: add "src" links to individual impls#33382
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 |
src/librustdoc/html/render.rs
Outdated
There was a problem hiding this comment.
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.
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