-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 clippy_lints
to intra-doc links
#6412
Conversation
This commit can (mostly) be replicated with `cargo intraconv`.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @llogiq (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
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.
Let's properly fix our documentation.
Co-authored-by: Philipp Krones <[email protected]>
not sure what I could have changed, sorry :/ |
That's changes from upstream rustc-repo-clippy that are waiting to be synced into this repo, see https://github.com/rust-lang/rust-clippy/pull/6404/files But the sync is currently blocked by this ICE which happens in our tests rust-lang/rust#79560 |
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 missed one thing
@@ -212,7 +212,7 @@ declare_clippy_lint! { | |||
/// ``` | |||
/// | |||
/// Note that there are crates that simplify creating the error type, e.g. | |||
/// [`thiserror`](https://docs.rs/thiserror). | |||
/// [`thiserror`]. |
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.
/// [`thiserror`]. | |
/// [`thiserror`](https://docs.rs/thiserror). |
@@ -171,7 +171,7 @@ declare_clippy_lint! { | |||
|
|||
declare_clippy_lint! { | |||
/// **What it does:** Checks for use of `&Box<T>` anywhere in the code. | |||
/// Check the [Box documentation](https://doc.rust-lang.org/std/boxed/index.html) for more information. | |||
/// Check the [`Box` documentation](std::boxed) for more information. |
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.
Will these links also work on https://rust-lang.github.io/rust-clippy/?
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'm not sure, how is that documentation built? If you're using mdbook then it won't work. I guess there's not much point to the PR then :/
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.
mdbook? You wish! We're still using our good ol' python script. 😄
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 yeah... I don't think we can change this in our lint documentation..
:( |
This commit can (mostly) be replicated with
cargo intraconv
. See rust-lang/rust#75080 for the rationale; it's mostly irrelevant to clippy, but it does make the links easier to read and write which seems worth it in itself.Please write a short comment explaining your change (or "none" for internal only changes)
changelog: none