Skip to content
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: use more precise URLs for jump-to-definition links #101868

Merged

Conversation

notriddle
Copy link
Contributor

As an example, this cuts down https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/ty/mod.rs.html by about 11%.

$ du -h new_mod.rs.html old_mod.rs.html
296K	new_mod.rs.html
332K	old_mod.rs.html

Like #83237, but separate code since source links have a different URL structure.

Related to Zulip discussion and the jump-to-definition pre-RFC.

As an example, this cuts down
<https://doc.rust-lang.org/nightly/nightly-rustc/src/rustc_middle/ty/mod.rs.html>
by about 11%.

    $ du -h new_mod.rs.html old_mod.rs.html
    296K	new_mod.rs.html
    332K	old_mod.rs.html
@rustbot rustbot added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Sep 15, 2022
@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2022
@GuillaumeGomez
Copy link
Member

This is really great! Thanks a lot for that!

@bors r+

@bors
Copy link
Contributor

bors commented Sep 15, 2022

📌 Commit 669498c has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 15, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 16, 2022
…llaumeGomez

Rollup of 7 pull requests

Successful merges:

 - rust-lang#101494 (rustdoc mobile: move notable traits to return type)
 - rust-lang#101813 (Extend CSS check to CSS variables)
 - rust-lang#101825 (Fix back RPIT changes)
 - rust-lang#101843 (Suggest associated const for incorrect use of let in traits)
 - rust-lang#101859 (Slight vertical formatting)
 - rust-lang#101868 (rustdoc: use more precise URLs for jump-to-definition links)
 - rust-lang#101877 (rustdoc: remove no-op CSS `.block { padding: 0 }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit c21dcd7 into rust-lang:master Sep 16, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 16, 2022
@notriddle notriddle deleted the notriddle/short-links-jump-to-definition branch September 16, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants