Skip to content

Clippy subtree update #145056

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

Merged
merged 116 commits into from
Aug 7, 2025
Merged

Clippy subtree update #145056

merged 116 commits into from
Aug 7, 2025

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Aug 7, 2025

r? @Manishearth

Cargo.lock update due to clippy version bump

smoelius and others added 30 commits May 19, 2025 19:29
When I first tried contributing to clippy,
I encountered the problem that a lot of lint suggestions overlapped
with existing lints, so I would spend a bunch of time implementing
something only to figure out it wasn't actually needed.

The "comparison with existing lints" field should hopefully reduce
this somewhat, while not incresing the burden of
requesting a new lint too much due to not being mandatory.
Co-authored-by: Philipp Krones <[email protected]>
changelog: [`ip_constant`]: fix suggestion when call is inside
parentheses like `(Ipv4Addr::new(127, 0, 0, 1))`

Very similar to the fix in
rust-lang/rust-clippy#15191
Signed-off-by: Jonathan Brouwer <[email protected]>
Fix `duplicated_attributes` lint to detect prefixed attributes like
`clippy::lint_name`.
Fixes rust-lang/rust-clippy#14942

changelog: [`duplicated_attributes`]: detect duplicated prefixed
attributes
…lang#15355)

Closes rust-lang/rust-clippy#15349

changelog: [`empty_structs_with_brackets`] fix wrong suggestions on
generics
rust-lang#15345)

…rom a macro

changelog: [`unnecessary_map_or`]: don't add parens if the parent expr
comes from a macro

fixes rust-lang/rust-clippy#14714
)

Closes rust-lang/rust-clippy#15061

changelog: [`let_unit_value`] fix wrong suggestions for format macros
flip1995 and others added 12 commits August 6, 2025 16:02
Follow-up of rust-lang/rust-clippy#15208.

This PR removes the CSS `bootstrap` dependency which contains 1504 CSS
rules and weights 16.1 kB minified. Considering we used less than 50 of
these rules, it's quite a waste.

So this time, there are minor UI changes:
* The "expand/collapse all" buttons icon changed. It now uses the one
from font-awesome. It's quite close but not exactly the same.
* The layout is slightly different (you need to switch between two tabs
to actually see the difference).

Before this PR:

<img width="719" height="515" alt="image"
src="https://github.com/user-attachments/assets/1f067046-4ee9-49ee-bf38-50a8bf9888f2"
/>

With this PR:

<img width="719" height="515" alt="image"
src="https://github.com/user-attachments/assets/80331c98-1a1e-418f-b481-5b3f5c276926"
/>

With this, we will be able to go even further on reducing the page size
next. =D

This time, the DOM size itself reduced a bit but the difference is too
small to be noteworthy.

r? @samueltardieu

changelog: Remove CSS bootstrap dependency
This limits repeated lookups in pre-checks (to determine if a MSRV
should be checked), especially when those require locking up an
interner:

- The `core` crate is looked up once when creating the lint, instead of
comparing the crate name with `sym::core` at every check.
- `span.ctxt().outer_expn_data()` is lookup up only once.

changelog: none
r? blyxyas
Two optimizations have been done when checking for the context in which
to apply the lint:

- Checking for the mere presence of comments does not require building a
  `String` with the comment to then check if it is empty and discard it.
- Checking for the presence of comment can be done after we have checked
  that we do have a `if` construct that we intend to lint instead of for
  every expression.
Two optimizations have been done when checking for the context in which
to apply the lint:

- Checking for the mere presence of comments does not require building a
`String` with the comment to then check if it is empty and discard it.
- Checking for the presence of comment can be done after we have checked
that we do have a `if` construct that we intend to lint instead of for
every expression.

changelog: none

r? blyxyas
Small typo I found while looking at recent lint requests/issues.

changelog: none
r? @ghost

changelog: none
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. labels Aug 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Aug 7, 2025

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.

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rustbot

This comment was marked as off-topic.

@Manishearth
Copy link
Member

@bors r+ p=1 rollup=never

thanks!

@bors
Copy link
Collaborator

bors commented Aug 7, 2025

📌 Commit 770e6f1 has been approved by Manishearth

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 7, 2025
@bors
Copy link
Collaborator

bors commented Aug 7, 2025

⌛ Testing commit 770e6f1 with merge 2fd855f...

@bors
Copy link
Collaborator

bors commented Aug 7, 2025

☀️ Test successful - checks-actions
Approved by: Manishearth
Pushing 2fd855f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 7, 2025
@bors bors merged commit 2fd855f into rust-lang:master Aug 7, 2025
11 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 7, 2025
Copy link
Contributor

github-actions bot commented Aug 7, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 321a89b (parent) -> 2fd855f (this PR)

Test differences

Show 4 test diffs

4 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 2fd855fbfc8239285aa2d596f76a8cc75e17ce02 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. x86_64-apple-2: 6663.7s -> 3565.5s (-46.5%)
  2. dist-apple-various: 5170.1s -> 3782.4s (-26.8%)
  3. pr-check-2: 2863.1s -> 2253.2s (-21.3%)
  4. aarch64-apple: 7877.4s -> 6339.5s (-19.5%)
  5. pr-check-1: 1755.4s -> 1417.1s (-19.3%)
  6. dist-x86_64-apple: 11646.9s -> 9494.9s (-18.5%)
  7. x86_64-gnu-llvm-20-2: 6542.5s -> 5547.1s (-15.2%)
  8. x86_64-gnu-tools: 3824.2s -> 3307.2s (-13.5%)
  9. x86_64-gnu-llvm-19: 2822.4s -> 2490.2s (-11.8%)
  10. x86_64-rust-for-linux: 2908.2s -> 2576.2s (-11.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2fd855f): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.5%, 0.6%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (secondary -3.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.3% [-3.3%, -3.3%] 1
All ❌✅ (primary) - - 0

Cycles

Results (secondary -2.1%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
2.9% [2.1%, 3.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-7.2% [-7.3%, -7.0%] 2
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 464.69s -> 465.394s (0.15%)
Artifact size: 377.37 MiB -> 377.41 MiB (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-clippy Relevant to the Clippy team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.