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

Clippy subtree update #134788

Merged
merged 171 commits into from
Dec 26, 2024
Merged

Clippy subtree update #134788

merged 171 commits into from
Dec 26, 2024

Conversation

flip1995
Copy link
Member

DJMcNab and others added 30 commits November 12, 2024 17:31
This is more likely to be intended as an intra-doc link than it is
to be intended as a refdef. If a refdef is intended, it does not
need to be nested within a list item or quote.

```markdown
- [`LONG_INTRA_DOC_LINK`]: this
  looks like an intra-doc link,
  but is actually a refdef.
  The first line will seem to
  disappear when rendered as HTML.
```
Co-Authored-By: Jason Newcomb <jsnewcomb@pm.me>
Changelog: extended [`precedence`] to lint for bitmasking and bit shifting without parentheses
The compiler uses `BitSet<Local>`, because the number of locals doesn't
get that high, so clippy should do likewise.
This updates the documentation after rust-lang#13694. It is not based on that PR
chain and can be merged independently, but should be merged after that
PR.

This is partly pulled from rust-lang#12762, but removing the Josh parts.

This includes instructions on how to publish `clippy_utils`.

Closes rust-lang/rust-clippy#13556 (yes, this
is the final PR 🙂)

r? @blyxyas

changelog: `clippy_utils` is now published to crates.io
…nishearth

Clippy subtree update

r? `@Manishearth`
Fixes rust-lang/rust-clippy#10780

We correctly no longer give a warning when a closure is passed to a
method, where one of the arguments to that method uses the variable
which would be shadowed by an argument to that closure.
Uses is defined loosely as any expression used in the calling expression
mentions the shadowee binding (except for the closure itself):

```rust
#![deny(clippy::shadow_unrelated)]
let x = Some(1);
let y = x.map(|x| x + 1);
```
will now succeed.

See linebender/xilem#745 - without this change,
all of the `expect(shadow_unrelated)` in the repository are met; with
it, none of them are.

changelog: [`shadow_unrelated`]: Don't treat closures arguments as
unrelated when the calling function uses them
The new cases are `x.map(f)` and `x.map_err(f)` when `f` is `Into::into`
or `From::from` with the same input and output types.
Lints with more than two segments are unrecognized, instead of having
the middle segments truncated.
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 26, 2024
@rustbot
Copy link
Collaborator

rustbot commented Dec 26, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@flip1995
Copy link
Member Author

flip1995 commented Dec 26, 2024

@bors p=1

This is 2 syncs in 1, as the last sync didn't go through because of conflicts I didn't get to address.

@flip1995 flip1995 force-pushed the clippy-subtree-update branch from c26f0d8 to 4d8acfe Compare December 26, 2024 14:12
@flip1995 flip1995 force-pushed the clippy-subtree-update branch from 4d8acfe to 8a7d8ec Compare December 26, 2024 14:15
@matthiaskrgr
Copy link
Member

r? @matthiaskrgr bors r+

@rustbot rustbot assigned matthiaskrgr and unassigned Manishearth Dec 26, 2024
@matthiaskrgr
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Dec 26, 2024

📌 Commit 8a7d8ec 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 26, 2024
@bors
Copy link
Contributor

bors commented Dec 26, 2024

⌛ Testing commit 8a7d8ec with merge 19e75f4...

@bors
Copy link
Contributor

bors commented Dec 26, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 19e75f4 to master...

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (19e75f4): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (primary -1.0%, secondary -3.2%)

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)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
-3.2% [-3.2%, -3.2%] 1
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 1

Cycles

Results (primary 1.6%, secondary 2.9%)

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

Binary size

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

Bootstrap: 765.011s -> 763.554s (-0.19%)
Artifact size: 330.55 MiB -> 330.54 MiB (-0.00%)

poliorcetics pushed a commit to poliorcetics/rust that referenced this pull request Dec 28, 2024
…tthiaskrgr

Clippy subtree update

r? `@Manishearth`
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.