Skip to content

Clippy subtree update #143064

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

Open
wants to merge 124 commits into
base: master
Choose a base branch
from
Open

Conversation

flip1995
Copy link
Member

r? @Manishearth

Cargo.lock update due to version bump

blyxyas and others added 30 commits March 21, 2025 15:41
Fix false positives on broken link detection

Refactor variable names

Fix doc comment about broken link lint

Refactor, remove not used variable

Improve broken link to catch more cases and span point to whole link

Include reason why a link is considered broken

Drop some checker because rustdoc already warn about them

Refactor to use a single enum instead of multiple bool variables

Fix lint warnings

Rename function to collect broken links

Warn directly instead of collecting all entries first

Iterate directly rather than collecting

Temporary change to confirm with code reviewer the next steps

Handle broken links as part of the fake_broken_link_callback handler

Simplify broken link detection without state machine usage

Fix typos

Add url check to reduce false positives

Drop reason enum as there is only one reason

Fix duplicated diagnostics

Fix linter
For example, adding `*` in front of `*expression` is best shown as
`**expression` rather than `*(*expression)`.

This is not perfect, as it checks whether the operator is already a prefix
of the expression, but it is better than it was before. For example,
`&`+`&mut x` will get `&&mut x` but `&mut `+`&x` will get `&mut (&x)`
as it did before this change.
If a reborrow is itself borrowed mutably, do not propose to replace it
by the original reference.
…nishearth

Clippy subtree update

r? `@Manishearth`

1 day late. Got distracted yesterday evening and forgot about it.
…g#14906)

Closes rust-lang/rust-clippy#14799

changelog: [`collapsible_else_if`] fix FP on conditionally compiled stmt
flip1995 and others added 7 commits June 26, 2025 18:40
This PR announces the feature freeze period talked about in
rust-lang/rust-clippy#14364

1. Add the page to the book
2. Modify the in-Github templates.
3. The third commit (to be squashed into the first) rolls the date
mentioned 6 weeks (so, starting on May 9th and ending on August 20th).
This gives us a comfortable buffer to make choices for this period.

We have a pending discussion on the rust-lang#14364. So having some more time to
make choices is very nice. I'm also preparing a Github action for
detecting new lints and posting a comment about the feature freeze
(being worked on in another branch)

Something I'd like comment on is the date formatting. I'm not sure if
"May 9th to the first of August" is the correct way of writing this
information in a book 😅.

changelog: Announce the feature freeze from May 9th to the first of
August
r? @ghost

changelog: none
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 26, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 26, 2025

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

These commits modify the Cargo.lock file. Unintentional changes to Cargo.lock can be introduced when switching branches and rebasing PRs.

If this was unintentional then you should revert the changes before this PR is merged.
Otherwise, you can ignore this comment.

@rustbot

This comment has been minimized.

flip1995 added 2 commits June 26, 2025 17:48
I expect that most people use stable Clippy. So having `master` be the first
documentation link in the list is weird. Now the versions are sorted
stable->beta->master.
@rust-log-analyzer

This comment has been minimized.

I expect that most people use stable Clippy. So having `master` be the
first documentation link in the list is weird. Now the versions are
sorted stable->beta->master.

changelog: none
@samueltardieu
Copy link
Contributor

@flip1995 You may want to cherry-pick the top commit of branch bootstrap-is-multiple-of in the samueltardieu/rust repository (or curl https://github.com/samueltardieu/rust/commit/67c56ea97c3565ac0f9acdd98d078df2e6668251.patch | git am).

Or I can submit it separately but that would require time to be merged before this PR is rebased, as there is currently a significant backlog in the queue.

@flip1995
Copy link
Member Author

I really need to get used to running Clippy in my sync workflow

@flip1995
Copy link
Member Author

Thanks for the patch! Feel free to push that to the sync right away. You should have all the necessary permissions.

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 27, 2025
@rust-log-analyzer

This comment has been minimized.

@flip1995 flip1995 removed the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 27, 2025
@flip1995 flip1995 force-pushed the clippy-subtree-update branch from a4066a0 to 4b3f31d Compare June 27, 2025 10:22
@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 27, 2025
@rustbot

This comment was marked as resolved.

@flip1995 flip1995 removed the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 27, 2025
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] gccjit_sys test:false 0.056
    Checking gccjit v2.7.0
[RUSTC-TIMING] gccjit test:false 0.517
    Checking rustc_codegen_gcc v0.1.0 (/checkout/compiler/rustc_codegen_gcc)
error: manual implementation of `.is_multiple_of()`
  --> compiler/rustc_codegen_gcc/src/intrinsic/simd.rs:64:41
   |
64 |         let expected_bytes = len / 8 + ((len % 8 > 0) as u64);
   |                                         ^^^^^^^^^^^^^ help: replace with: `!len.is_multiple_of(8)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of
   = note: `-D clippy::manual-is-multiple-of` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::manual_is_multiple_of)]`

error: manual implementation of `.is_multiple_of()`
   --> compiler/rustc_codegen_gcc/src/intrinsic/simd.rs:679:55
    |
679 |         let expected_bytes = expected_int_bits / 8 + ((expected_int_bits % 8 > 0) as u64);
    |                                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `!expected_int_bits.is_multiple_of(8)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of

[RUSTC-TIMING] rustc_codegen_gcc test:false 4.362
error: could not compile `rustc_codegen_gcc` (lib) due to 2 previous errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.