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

Convert many files to intra-doc links #76235

Merged
merged 5 commits into from
Sep 3, 2020
Merged

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Sep 2, 2020

Helps with #75080
r? @poliorcetics
I recommend reviewing one commit at a time, but the diff is small enough you can do it all at once if you like :)

@jyn514 jyn514 added A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name labels Sep 2, 2020
@jyn514
Copy link
Member Author

jyn514 commented Sep 2, 2020

@bors delegate=poliorcetics

@bors
Copy link
Contributor

bors commented Sep 2, 2020

✌️ @poliorcetics can now approve this pull request

@jyn514
Copy link
Member Author

jyn514 commented Sep 2, 2020

cafab51 is now possible after #75652.
2b01df4 I think was just missed by your script because of the hash fragments, I converted it with sed 's@../io/index.html#platform-specific-behavior@crate::io#platform-specific-behavior@' library/std/src/fs.rs -i.

I found both of these with rg '\[.*\]: \.\./.*' library/ | rg -v '\.\./(book|reference|primitive.slice.html)'.

@jyn514
Copy link
Member Author

jyn514 commented Sep 2, 2020

Actually there are some more links I want to convert, so marking as WIP.

@jyn514 jyn514 changed the title Convert even more links to intra-doc links in std::fs and std::net::io [WIP] Convert even more links to intra-doc links in std::fs and std::net::io Sep 2, 2020
@jyn514 jyn514 changed the title [WIP] Convert even more links to intra-doc links in std::fs and std::net::io Convert many files to intra-doc links Sep 2, 2020
@jyn514
Copy link
Member Author

jyn514 commented Sep 2, 2020

Found most of these using the regex in #75080 (comment). Once this and the claimed files are done I think the tracking issue will be almost ready to close :) except for primitives, upstream links, and core/str/mod.rs.

@jyn514 jyn514 added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 2, 2020
@LeSeulArtichaut

This comment has been minimized.

@jyn514
Copy link
Member Author

jyn514 commented Sep 2, 2020

Yeah bors is confused and doesn't know what to do about reviewers that aren't part of the rust-lang org. If you like I can assign myself, but that seems a little silly.

@jyn514
Copy link
Member Author

jyn514 commented Sep 2, 2020

Hmm ... the CI failure looks like the same issues as in #76106. I'll try to debug that after #75756 lands, I'll revert the changes to MaybeUninit in the meantime.

Copy link
Contributor

@LeSeulArtichaut LeSeulArtichaut left a comment

Choose a reason for hiding this comment

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

Looks good to me, left a nit and a question

library/std/src/fs.rs Outdated Show resolved Hide resolved
library/std/src/sys/unix/ext/fs.rs Show resolved Hide resolved
@LeSeulArtichaut
Copy link
Contributor

Also I guess you may want to squash your commits before merging?

@jyn514
Copy link
Member Author

jyn514 commented Sep 2, 2020

Also I guess you may want to squash your commits before merging?

I was planning to keep them as-is, one per file, but I can squash if you prefer.

@LeSeulArtichaut
Copy link
Contributor

I don’t have any preference and I don’t even have merge permissions here, I was only suggesting this because I know some reviewers like to have everything clean and squashed

library/std/src/prelude/mod.rs Outdated Show resolved Hide resolved
library/std/src/sys/unix/ext/fs.rs Show resolved Hide resolved
@poliorcetics
Copy link
Contributor

poliorcetics commented Sep 2, 2020

One commit per file does not bother me but this is a doc PR so squashing won't lose much history or make bisecting harder.

- Use intra-doc links for `std::io` in `std::fs`
- Use intra-doc links for File::read in unix/ext/fs.rs
- Remove explicit intra-doc links for `true` in `net/addr.rs`
- Use intra-doc links in alloc/src/sync.rs
- Use intra-doc links in src/ascii.rs
- Switch to intra-doc links in alloc/rc.rs
- Use intra-doc links in core/pin.rs
- Use intra-doc links in std/prelude
- Use shorter links in `std/fs.rs`

  `io` is already in scope.
@jyn514
Copy link
Member Author

jyn514 commented Sep 3, 2020

@poliorcetics did I miss a review comment, is this waiting on anything?

@poliorcetics
Copy link
Contributor

No sorry, I just forgot I was the one responsible for this 😅.

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 3, 2020

📌 Commit bb10347 has been approved by poliorcetics

@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 3, 2020
@bors
Copy link
Contributor

bors commented Sep 3, 2020

⌛ Testing commit bb10347 with merge 08deb86...

@bors
Copy link
Contributor

bors commented Sep 3, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: poliorcetics
Pushing 08deb86 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 3, 2020
@bors bors merged commit 08deb86 into rust-lang:master Sep 3, 2020
@jyn514 jyn514 deleted the std-intra-links branch September 3, 2020 12:23
@cuviper cuviper added this to the 1.48.0 milestone Nov 16, 2023
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 A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name 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.

5 participants