-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix convert module's documentation links #59923
Conversation
@@ -213,7 +213,7 @@ pub trait AsMut<T: ?Sized> { | |||
/// | |||
/// # Generic Implementations | |||
/// | |||
/// - [`From<T>`]` for U` implies `Into<U> for T` |
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.
Please keep this as is and let From<T>
be linked to From
.
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.
The documentation is inconsistent in this regard. Some places it uses
[`From<T>`]` ...`
other times it uses
[`From`]`<T> ...`
Why do you prefer the former? The latter reduces copy paste of the link destinations.
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.
Otherwise it looks like this: From
<T>
which doesn't look great.
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.
See convert module it looks fine
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.
So should I fix this line too?
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.
Personally I think it looks weird; there's a space in-between that shouldn't be there, but I leave it to Steve.
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.
We don't have a good convention, and I agree the space is unfortunate. Maybe @rust-lang/rustdoc can weigh in?
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 tend to prefer how @czipperz wrote it.
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.
Although the spacing should theoretically be more messed up in the later as @Centril pointed out, it really looks more messed up the former when rendered by rustdoc. Strange.
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.
Why removing the links on |
@GuillaumeGomez turns out they aren't broken. My bad. But it is standard to not link to Self |
ping from triage @steveklabnik any updates? |
Sorry for taking so long here; I took two weeks off. Thank you for this! @bors: r+ rollup |
📌 Commit 1f5d510 has been approved by |
…teveklabnik Fix convert module's documentation links r? @steveklabnik
Rollup of 9 pull requests Successful merges: - #59825 (string: implement From<&String> for String) - #59923 (Fix convert module's documentation links) - #60691 (Include expression to wait for to the span of Await) - #60763 (Move token tree related lexer state to a separate struct) - #60769 (Update rustc book CLI docs.) - #60811 (Bump measureme dependency to 0.3) - #60816 (README.md: Mention MSVC 2017+, not 2013(!)) - #60827 (Use `Symbol` more in lint APIs) - #60851 (Move `box` from the stable keyword to unstable keywords list) Failed merges: r? @ghost
…teveklabnik Fix convert module's documentation links r? @steveklabnik
…teveklabnik Fix convert module's documentation links r? @steveklabnik
Rollup of 6 pull requests Successful merges: - #59825 (string: implement From<&String> for String) - #59923 (Fix convert module's documentation links) - #60691 (Include expression to wait for to the span of Await) - #60769 (Update rustc book CLI docs.) - #60816 (README.md: Mention MSVC 2017+, not 2013(!)) - #60851 (Move `box` from the stable keyword to unstable keywords list) Failed merges: r? @ghost
r? @steveklabnik