Skip to content
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

Update Clippy #114310

Merged
merged 148 commits into from
Aug 1, 2023
Merged

Update Clippy #114310

merged 148 commits into from
Aug 1, 2023

Conversation

flip1995
Copy link
Member

r? @Manishearth

This is a bit delayed, because I thought it is a difficult conflict resolution and didn't have time for that over the weekend. Turns out, I just used the wrong merge base and it was actually easy... Don't do syncs in the middle of the night (even though I broke this rule with this PR again).

y21 and others added 30 commits June 30, 2023 14:54
Make it trim the contents
…1995

Update bug URL to use the ice template

The previous URL linked to the blank new issue from without any template. This will now link to the ICE template :)

* Before: https://github.com/rust-lang/rust-clippy/issues/new
* After: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml

That's it, nothing too interesting besides that. For everyone reading this: here, have some free cream 🍨 🍦 and have a beautiful day. 🙃

changelog: none
[`semicolon_if_nothing_returned`]: add an autofix

changelog: [`semicolon_if_nothing_returned`]: add an autofix
…sery, r=xFrednet

Move tuple_array_conversions to nursery

changelog: Move [`tuple_array_conversions`] to `nursery` (Now allow-by-default)
<!-- FIY: Ignore this change, if the commit gets backported and also rust-lang/rust-clippy#11146 -->
[rust-lang#11172](rust-lang/rust-clippy#11172)

The nursery change got lost in rust-lang#11146 and it ended up in pedantic, this puts it in nursery and gives something to backport

r? `@xFrednet`
new lint: `format_collect`

A perf lint that looks for `format!`ing inside of `map`, then collecting it into a `String`. Did a quick benchmark locally and it's a bit more than 2x faster with fold.
`write!` is still not optimal (presumably because the fmt stuff goes through dynamic dispatch), but it's still a lot better than creating a new string on every element.
I thought about making a machine applicable suggestion, but there's a lot of suggestions that need to be made here, so I decided to just add help messages.

changelog: new lint: `format_collect`
…=Manishearth

Don't lint `needless_return` in fns across a macro boundary

Fixes rust-lang#11167

changelog: none
…ogiq

Rewrite [`tuple_array_conversions`]

Fixes rust-lang#11100
Fixes rust-lang#11144
Fixes rust-lang#11124

rust-lang#11082 still needs discussion and rust-lang#11085 likely can't be fixed.

changelog: [`tuple_array_conversions`]: Move to `pedantic`
changelog: [`tuple_array_conversions`]: Don't lint if mutability of references changes
changelog: [`tuple_array_conversions`]: Don't lint if bindings don't come from the exact same pattern
changelog: [`tuple_array_conversions`]: Don't lint if bindings are used for more than just the conversion
New lint [`four_forward_slashes`]

Closes rust-lang#9212

changelog: New lint [`four_forward_slashes`]
Jarcho and others added 12 commits July 30, 2023 00:38
Improve debug assertions for `make_projection`
* Better track when a early-bound region appears when a late-bound region is required
* Don't lint when the closure gives explicit types.
`redundant_closure` fixes

fixes rust-lang#8548

A good chunk of the code is fixing false negatives. The old code banned any non late-bound regions from appearing in the callee's signature. The new version checks when the late-bound region is actually required.

changelog: Better track when a early-bound region appears when a late-bound region is required in `redundant_closure`.
changelog: Don't lint `redundant_closure` when the closure gives explicit types.
Resolve type aliases in `type_certainty`

Fixes rust-lang#11256

changelog: `unwrap_or_default`: Fix ICE when local types are declared using alias types
[`unnecessary_find_map`]: look for then_some

Closes rust-lang#11260

changelog: [`unnecessary_find_map`]: lint `.then_some()` in closure
[`arithmetic_side_effects`] Fix rust-lang#11262

Fix rust-lang#11262

Rustc already handles paths that refer literals -> https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=d795058a2e1634c867288c20ff9432c8

```
changelog: [`arithmetic_side_effects`]: Ignore paths that refer literals
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 31, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 31, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@flip1995 flip1995 changed the title Clippyup Update Clippy Jul 31, 2023
@Manishearth
Copy link
Member

@bors r+ p=1 rollup=never

thanks!

@bors
Copy link
Contributor

bors commented Jul 31, 2023

📌 Commit 53f09d9 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 Jul 31, 2023
@bors
Copy link
Contributor

bors commented Aug 1, 2023

⌛ Testing commit 53f09d9 with merge b484c87...

@bors
Copy link
Contributor

bors commented Aug 1, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 1, 2023
@bors bors merged commit b484c87 into rust-lang:master Aug 1, 2023
11 checks passed
@rustbot rustbot added this to the 1.73.0 milestone Aug 1, 2023
@flip1995 flip1995 deleted the clippyup branch August 1, 2023 07:38
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b484c87): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
2.6% [2.6%, 2.6%] 1
Regressions ❌
(secondary)
3.0% [2.1%, 4.4%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.6% [2.6%, 2.6%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

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

Binary size

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

Bootstrap: 651.969s -> 649.854s (-0.32%)

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

Successfully merging this pull request may close these issues.