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

Move to intra doc links in std::net #75567

Merged
merged 2 commits into from
Aug 16, 2020

Conversation

poliorcetics
Copy link
Contributor

Helps with #75080.

@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc

The links for true and false had to stay else rustdoc complained, it is intended ?

@rustbot rustbot added A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name A-docs Area: documentation for any part of the project, including the compiler, standard library, and tools T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 15, 2020
@rust-highfive
Copy link
Collaborator

r? @Mark-Simulacrum

(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 Aug 15, 2020
@poliorcetics
Copy link
Contributor Author

r? @jyn514

@jyn514
Copy link
Member

jyn514 commented Aug 15, 2020

The links for true and false had to stay else rustdoc complained, it is intended ?

Yes, the rustdoc team decided that since only std links to true and false it wasn't worth redoing large parts of the intra-doc-link pass: #75101.

library/std/src/net/addr.rs Show resolved Hide resolved
Comment on lines 475 to 480
/// - private addresses (see [`Ipv4Addr::is_private`])
/// - the loopback address (see [`Ipv4Addr::is_loopback`])
/// - the link-local address (see [`Ipv4Addr::is_link_local`])
/// - the broadcast address (see [`Ipv4Addr::is_broadcast`])
/// - addresses used for documentation (see [`Ipv4Addr::is_documentation`])
/// - the unspecified address (see [`Ipv4Addr::is_unspecified`]), and the whole
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be nice to keep the () so it's clear it's a method. As a bonus it makes the doc pass insignificantly faster :P

Suggested change
/// - private addresses (see [`Ipv4Addr::is_private`])
/// - the loopback address (see [`Ipv4Addr::is_loopback`])
/// - the link-local address (see [`Ipv4Addr::is_link_local`])
/// - the broadcast address (see [`Ipv4Addr::is_broadcast`])
/// - addresses used for documentation (see [`Ipv4Addr::is_documentation`])
/// - the unspecified address (see [`Ipv4Addr::is_unspecified`]), and the whole
/// - private addresses (see [`Ipv4Addr::is_private()`])
/// - the loopback address (see [`Ipv4Addr::is_loopback()`])
/// - the link-local address (see [`Ipv4Addr::is_link_local()`])
/// - the broadcast address (see [`Ipv4Addr::is_broadcast()`])
/// - addresses used for documentation (see [`Ipv4Addr::is_documentation()`])
/// - the unspecified address (see [`Ipv4Addr::is_unspecified()`]), and the whole

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I do it for every link to a method in all the files ?

Copy link
Member

Choose a reason for hiding this comment

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

Only when it makes the docs more clear. The performance benefit really is insignificant, don't worry too much about that.

library/std/src/net/ip.rs Outdated Show resolved Hide resolved
library/std/src/net/ip.rs Outdated Show resolved Hide resolved
library/std/src/net/ip.rs Outdated Show resolved Hide resolved
library/std/src/net/ip.rs 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 Aug 15, 2020
@jyn514
Copy link
Member

jyn514 commented Aug 16, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 16, 2020

📌 Commit 5fc187c has been approved by jyn514

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

bors commented Aug 16, 2020

⌛ Testing commit 5fc187c with merge 7a4fb35...

@bors
Copy link
Contributor

bors commented Aug 16, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: jyn514
Pushing 7a4fb35 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 16, 2020
@bors bors merged commit 7a4fb35 into rust-lang:master Aug 16, 2020
@poliorcetics poliorcetics deleted the intra-links-std-net branch August 17, 2020 19:19
@jyn514 jyn514 removed the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 25, 2020
@cuviper cuviper added this to the 1.47.0 milestone May 2, 2024
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.

7 participants