-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
r? @jyn514 |
Yes, the rustdoc team decided that since only std links to |
library/std/src/net/ip.rs
Outdated
/// - 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 |
There was a problem hiding this comment.
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
/// - 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 |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
@bors r+ rollup |
📌 Commit 5fc187c has been approved by |
☀️ Test successful - checks-actions, checks-azure |
Helps with #75080.
@rustbot modify labels: T-doc, A-intra-doc-links, T-rustdoc
The links for
true
andfalse
had to stay elserustdoc
complained, it is intended ?