Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update Clippy #105827

Merged
merged 101 commits into from
Dec 17, 2022
Merged

Update Clippy #105827

merged 101 commits into from
Dec 17, 2022

Conversation

flip1995
Copy link
Member

xFrednet and others added 30 commits November 21, 2022 23:28
Lower them into a single item with multiple resolutions instead.
This also allows to remove additional `NodId`s and `DefId`s related to those additional items.
Don't lint `string_lit_as_bytes` in match scrutinees

fixes rust-lang#9885
changelog: `string_lit_as_bytes`: Don't lint in match scrutinees
…=xFrednet

Fix manual_let_else produces a wrong suggestion with or-patterns

Fix rust-lang#9938
changelog: Sugg: [`manual_let_else`]: Suggestions for or-patterns now include required brackets.
[rust-lang#9966](rust-lang/rust-clippy#9966)
Don't suggest removing `mut` from references in `redundant_static_lifetimes`

fixes rust-lang#9890
changelog: `redundant_static_lifetimes`: Don't suggest removing `mut` from references
Treat custom enum discriminant values as constants

fixes rust-lang#9882
changelog: All lints: Don't lint in enum discriminant values when the suggestion won't work in a const context
nbdd0121 and others added 13 commits December 15, 2022 18:56
…s, r=lcnr

`SimplifiedType` cleanups

r? `@lcnr`
Fix new_return_no_self with recursive bounds

Fix rust-lang#10041

This uses a hash set, as described in rust-lang/rust-clippy#10068 (comment)

changelog: [`new_return_no_self`]: fix stack overflow when the return type is `impl Trait` and contains recursive bounds
There used to be a logical bug where IncrementVisitor would
completely stop checking an expression/block after seeing a continue
statement. This led to issue rust-lang#10058 where a variable incremented
(or otherwise modified) after any continue statement would still be
considered incremented only once.

The solution is to continue scanning the expression after seeing a
`continue` statement, but increment self.depth so that the Visitor
thinks that the rest of the loop is within a conditional.
…Frednet

fix logic in IncrementVisitor

There used to be a logical bug where IncrementVisitor would completely stop checking an expression/block after seeing a continue statement.

I am a little unsure of whether my fix to `IncrementVisitor` is logically sound (I hope it makes sense). Let me know what you think, and thanks in advance for the review!

fixes rust-lang#10058

---

changelog: FP: [`explicit_counter_loop`]: No longer ignores counter changes after `continue` expressions
[rust-lang#10094](rust-lang/rust-clippy#10094)
<!-- changelog_checked -->
fix: not suggest seek_to_start_instead_of_rewind when expr is used

changelog: [`seek_to_start_instead_of_rewind`]: No longer lints, if the return of `seek` is used.
[rust-lang#10096](rust-lang/rust-clippy#10096)
<!-- changelog_checked -->

Fixes rust-lang#10065
Rustup

r? `@ghost`

I'm on the train and my internet is too bad to download the necessary toolchain, so I have to use CI to find sync fallout.

changelog: none
<!-- changelog_checked -->
@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 17, 2022
@rustbot
Copy link
Collaborator

rustbot commented Dec 17, 2022

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@matthiaskrgr
Copy link
Member

@bors r+ p=1 subtree sync

@bors
Copy link
Contributor

bors commented Dec 17, 2022

📌 Commit 10f2a6d has been approved by matthiaskrgr

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 Dec 17, 2022
@bors
Copy link
Contributor

bors commented Dec 17, 2022

⌛ Testing commit 10f2a6d with merge 2d76a9d...

@bors
Copy link
Contributor

bors commented Dec 17, 2022

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 2d76a9d to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 17, 2022
@bors bors merged commit 2d76a9d into rust-lang:master Dec 17, 2022
@rustbot rustbot added this to the 1.68.0 milestone Dec 17, 2022
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2d76a9d): 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)
-0.3% [-0.3%, -0.3%] 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)
- - 0
Regressions ❌
(secondary)
1.7% [1.1%, 2.6%] 5
Improvements ✅
(primary)
-3.3% [-3.3%, -3.3%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -3.3% [-3.3%, -3.3%] 1

Cycles

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

# for free to join this conversation on GitHub. Already have an account? # 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging this pull request may close these issues.