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

Use relative links in the unstable and rustc book #105763

Merged
merged 1 commit into from
Dec 16, 2022

Conversation

Ezrashaw
Copy link
Contributor

@Ezrashaw Ezrashaw commented Dec 15, 2022

Fixes #98227.

As it stands, potential issues could arise from mismatch of stable/ nightly in the books. This PR fixes this issue by using relative links instead of absolute ones. I have replaced every absolute link under src/doc/rustc and src/doc/unstable-book/ and tested each manually.

The link at src/doc/rustc/src/targets/index.md:7:
[here](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_target/spec/struct.Target.html).
I need help with because my local directory structure and https://doc.rust-lang.org/ seem to be different, where is nightly-rustc?

@jyn514

@rustbot
Copy link
Collaborator

rustbot commented Dec 15, 2022

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

Please see the contribution instructions for more information.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 15, 2022
@jyn514
Copy link
Member

jyn514 commented Dec 15, 2022

The link at src/doc/rustc/src/targets/index.md:7:
here.
I need help with because my local directory structure and https://doc.rust-lang.org/ seem to be different, where is nightly-rustc?

nightly-rustc is the base url for the compiler docs. If you run x doc --stage 0 compiler, you should see the docs in build/$TARGET/compiler-doc/.

You can use x test --stage 0 linkchecker to verify the links work :) you don't need to do it manually.

Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great, thanks! Happy to approve the PR once CI passes and you address the comments I left :)

src/doc/rustc/src/json.md Outdated Show resolved Hide resolved
src/doc/rustc/src/exploit-mitigations.md Outdated Show resolved Hide resolved
src/doc/rustc/src/platform-support/fuchsia.md Outdated Show resolved Hide resolved
@jyn514 jyn514 added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 15, 2022
@jyn514
Copy link
Member

jyn514 commented Dec 15, 2022

r? @jyn514

@rustbot rustbot assigned jyn514 and unassigned JohnTitor Dec 15, 2022
@jyn514 jyn514 added the A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools label Dec 15, 2022
@Ezrashaw
Copy link
Contributor Author

You can use x test --stage 0 linkchecker to verify the links work :) you don't need to do it manually.

Oh well, that was only 30 minutes and linkchecker says there are a couple broken ones :(.

Ok, I'll do all your suggestions and fix the broken links, do you want me to squash and force-push? (I'm new to this)

@jyn514
Copy link
Member

jyn514 commented Dec 15, 2022

Yes, force-pushing would be great :) there are instructions on https://rustc-dev-guide.rust-lang.org/git.html#advanced-rebasing

Co-authored-by: Joshua Nelson <github@jyn.dev>
@jyn514
Copy link
Member

jyn514 commented Dec 16, 2022

Looks great, thank you!

@bors r+

@bors
Copy link
Contributor

bors commented Dec 16, 2022

📌 Commit 9ea3550 has been approved by jyn514

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 16, 2022
@bors
Copy link
Contributor

bors commented Dec 16, 2022

⌛ Testing commit 9ea3550 with merge 01ef4b2...

@bors
Copy link
Contributor

bors commented Dec 16, 2022

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing 01ef4b2 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 16, 2022
@bors bors merged commit 01ef4b2 into rust-lang:master Dec 16, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 16, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (01ef4b2): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

@Ezrashaw Ezrashaw deleted the rustc-book-relative-links branch December 18, 2022 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use relative links in the unstable book
6 participants