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 118 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
samueltardieu and others added 24 commits June 21, 2025 16:52
…ust-lang#15093)

Closes rust-lang/rust-clippy#15091

The lack of ability to escape raw identifiers is a known issue of
Clippy. In this case, it can be avoided by snippet from the code.

changelog: [`wildcard_enum_match_arm`] fix wrong suggestions with raw
identifiers
In `wildcard_enum_match_arm`, expanding a variant with struct-like
fields was missing a space between the variant name and the opening
bracket.

Also, add a test for tuple-like variants with only one field, as those
are expanded as `VariantName(_)` instead of `VariantName(..)`.
In `wildcard_enum_match_arm`, expanding a variant with struct-like
fields was missing a space between the variant name and the opening
bracket.

Also, add a test for tuple-like variants with only one field, as those
are expanded as `VariantName(_)` instead of `VariantName(..)`.

changelog: none
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Violets are red,
Roses are blue,
Summer’s a feeling,
And we’re feeling it too.

<hr>

> (Please ping me when June made it as the cat of the release. I want to
send it to her owner :D)

@xFrednet voila:

![image](https://github.com/user-attachments/assets/7908abd0-76a5-4a64-a553-9c443d4c8b37)

Cats for the next release can be traditionally nominated in the comments
:D
Please be more active and cat-minded 😻

<hr>

changelog: none

r? flip1995
update to literal-escaper 0.0.4 for better API without `unreachable` and faster string parsing

This is the replacement for just the part of rust-lang#138163 dealing with the changed API of unescape functionality, since that got moved into its own crate.

<del>This uses an unpublished version of literal-escaper (https://github.com/rust-lang/literal-escaper/pull/8).</del>

r? `@nnethercote`
…kingjubilee

Rollup of 15 pull requests

Successful merges:

 - rust-lang#135731 (Implement parsing of pinned borrows)
 - rust-lang#138780 (Add `#[loop_match]` for improved DFA codegen)
 - rust-lang#142453 (Windows: make `read_dir` stop iterating after the first error is encountered)
 - rust-lang#142633 (Error on invalid signatures for interrupt ABIs)
 - rust-lang#142768 (Avoid a bitcast FFI call in transmuting)
 - rust-lang#142825 (Port `#[track_caller]` to the new attribute system)
 - rust-lang#142844 (Enable short-ice for Windows)
 - rust-lang#142934 (Tweak `-Zmacro-stats` measurement.)
 - rust-lang#142955 (Couple of test suite fixes for cg_clif)
 - rust-lang#142977 (rustdoc: Don't mark `#[target_feature]` functions as ⚠)
 - rust-lang#142980 (Reduce mismatched-lifetime-syntaxes suggestions to MaybeIncorrect)
 - rust-lang#142982 (Corrected spelling mistake in c_str.rs)
 - rust-lang#142983 (Taint body on invalid call ABI)
 - rust-lang#142988 (Update wasm-component-ld to 0.5.14)
 - rust-lang#142993 (Update cargo)

r? `@ghost`
`@rustbot` modify labels: rollup
Add beta-accepted to CHANGELOG for 1.88 since it was missed at
rust-lang/rust-clippy#5095

changelog: none

r? flip1995
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 was marked as resolved.

@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] serde_derive test:false 6.570
    Checking build_helper v0.1.0 (/checkout/src/build_helper)
[RUSTC-TIMING] object test:false 2.597
[RUSTC-TIMING] build_helper test:false 0.704
error: manual implementation of `.is_multiple_of()`
   --> src/bootstrap/src/utils/render_tests.rs:205:45
    |
205 |         if self.terse_tests_in_line != 0 && self.terse_tests_in_line % TERSE_TESTS_PER_LINE == 0 {
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `self.terse_tests_in_line.is_multiple_of(TERSE_TESTS_PER_LINE)`
    |
    = 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)]`

@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.

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.