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 #113260

Merged
merged 430 commits into from
Jul 2, 2023
Merged

Update Clippy #113260

merged 430 commits into from
Jul 2, 2023

Conversation

flip1995
Copy link
Member

@flip1995 flip1995 commented Jul 2, 2023

r? @Manishearth

cc @oli-obk (for the ui-test changes in de69d55 and the valtree fix in 0cbe963)

Fixes #102093

This must've been the most involved Clippy sync ever.

bors and others added 30 commits June 12, 2023 05:30
…shearth

Extend `explicit_iter_loop` and `explicit_into_iter_loop`

fixes rust-lang#1518

Some included cleanups
* Split `for_loop` test into different files for each lint (partially).
* Move handling of some `into_iter` cases from `explicit_into_iter`.

---

changelog: Enhancement: [`explicit_iter_loop`]: Now also handles types that implement `IntoIterator`.
[rust-lang#10416](rust-lang/rust-clippy#10416)

changelog: Sugg: [`explicit_into_iter_loop`]: The suggestion now works on mutable references.
[rust-lang#10416](rust-lang/rust-clippy#10416)
<!-- changelog_checked -->
…blyxyas,xFrednet

[`type_repetition_in_bounds`]: Don't lint on derived code

fixes rust-lang#10504.

changelog: [`type_repetition_in_bounds`]: Don't lint on derived code
…as,xFrednet

New lint [`min_ident_chars`]

Closes rust-lang#10915

This also implements `WithSearchPat` for `Ident`, as I was going to rewrite this as a late lint to optionally ignore fields and/or generics but this was more complex than anticipated

changelog: New lint [`min_ident_chars`]
[rust-lang#10916](rust-lang/rust-clippy#10916)
new lint: `large_stack_frames`

This implements a lint that looks for functions that use a lot of stack space.

It uses the MIR because conveniently every temporary gets its own local and I think it maps best to stack space used in a function.
It's probably going to be quite inaccurate in release builds, but at least for debug builds where opts are less aggressive on LLVM's side I think this is accurate "enough".

(This does not work for generic functions yet. Not sure if I should try to get it working in this PR or if it could land without it for now and be added in a followup PR.)

I also put it under the nursery category because this probably needs more work...

changelog: new lint: [`large_stack_frames`]
Don't linting `as_conversions` in proc macros

Don't linting `as_conversions` if code was generated by procedural macro.

This PR fixes rust-lang/rust-clippy#9657

I implemented the fix changing the lint code to be a `LateLintPass` in order to be able to use the `is_from_proc_macro` out of the box. If the reviwer thinks that it would be better to do the other way (implementing `WithSearchPat`) just let me know. I might need some help in implementing it for the `ustc_ast::ast::Expr`

changelog: [`as_conversions`] avoiding warnings in macro-generated code
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 2, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 2, 2023

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.

@flip1995
Copy link
Member Author

flip1995 commented Jul 2, 2023

@bors rollup=never (Cargo.lock and Cargo.toml changes)

@Manishearth
Copy link
Member

@bors r+ p=1

@bors
Copy link
Contributor

bors commented Jul 2, 2023

📌 Commit a6d3c82 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 2, 2023
@bors
Copy link
Contributor

bors commented Jul 2, 2023

⌛ Testing commit a6d3c82 with merge 32d81ec...

@bors
Copy link
Contributor

bors commented Jul 2, 2023

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (32d81ec): comparison URL.

Overall result: ❌ regressions - 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)
1.0% [1.0%, 1.0%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
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.7% [0.5%, 0.8%] 2
Regressions ❌
(secondary)
3.2% [3.2%, 3.2%] 1
Improvements ✅
(primary)
-0.9% [-1.4%, -0.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.1% [-1.4%, 0.8%] 4

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.5% [0.5%, 0.5%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.5% [0.5%, 0.5%] 1

Binary size

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

Bootstrap: 661.354s -> 661.67s (0.05%)

@flip1995 flip1995 deleted the clippyup branch July 3, 2023 07:43
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-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.

Blessing clippy with x.py does not work the same way as other tools