Skip to content

Conversation

@flip1995
Copy link
Member

r? @Manishearth

Cargo.lock update due to Clippy version bump.

ada4a and others added 30 commits October 20, 2025 19:58
they are much readable this way imo
This is a general advice, and so shouldn't be repeated
This makes the labels redundant.
Add a new lint that detects the use of decimal literals as bit masks in
bitwise operations. Using decimal literals for bit masks can obscure the
intended bit pattern and reduce code readability. This lint encourages
the use of binary (`0b...`) or hexadecimal (`0x...`) notation to make
bit patterns explicit and easier to understand at a glance.

Example:

```rust
let masked = x & 14; // Bad: decimal literal as bit mask
let masked = x & 0b1110; // Good: bit pattern is explicit
```

changelog: [`decimal_bitwise_operands`]: new lint

Fixes rust-lang/rust-clippy#1775
Related to
https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast
(and very much modelled off of its implementation).

This lint is motivated by cleaning up the output of
[c2rust](https://c2rust.com/), which contains many `.offset` calls with
by literal. The lint also nicely handles offsets by zero, which are
unnecessary.

I'm aware that the feature freeze is still in place, but this was
top-of-mind now. I'll patiently wait until the freeze is lifted.

changelog: [`ptr_offset_by_literal`]: add `ptr_offset_by_literal` lint
…15101)

Closes rust-lang/rust-clippy#15099

The compiler will generate a special `main` function for the tests,
which caused this FP.

changelog: [`large_stack_frames`] fix FP on compiler generated targets
Now the program checks for transmutting from a struct containing a
single raw pointer to a reference.

```Rust
struct Foo(*const i32);
fn foo(foo: Foo) -> &i32 {
    unsafe { transmute(foo) }
}
```

changelog: [`transmute_ptr_to_ref`]: now checks for a pointer wrapped in
a struct
Now the program checks for transmutting from a struct containing a
single raw pointer to a raw pointer.

changelog: [`transmute_ptr_to_ptr`]: now checks for a pointer wrapped in
a struct
Before this PR:

<img width="722" height="306" alt="Screenshot From 2025-11-28 13-04-55"
src="https://github.com/user-attachments/assets/8c2d1eb2-6030-43d1-984a-174988c73e76"
/>

With this PR:

<img width="722" height="306" alt="Screenshot From 2025-11-28 13-05-01"
src="https://github.com/user-attachments/assets/ae8a344f-b876-44b3-9ddc-aaeebc0dccd4"
/>

r? @Alexendoo

changelog: Fix display of dropdown menu "buttons"
@samueltardieu
Copy link
Member

@bors r+ rollup=never p=1 subtree update

@bors
Copy link
Collaborator

bors commented Dec 11, 2025

📌 Commit 26c164f has been approved by samueltardieu

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 11, 2025
@bors
Copy link
Collaborator

bors commented Dec 12, 2025

⌛ Testing commit 26c164f with merge bb88319...

bors added a commit that referenced this pull request Dec 12, 2025
Clippy subtree update

r? `@Manishearth`

Cargo.lock update due to Clippy version bump.
@bors
Copy link
Collaborator

bors commented Dec 12, 2025

💔 Test failed - checks-actions

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

Strange failure.
@bors try jobs=dist-x86_64-apple

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Dec 12, 2025
Clippy subtree update

try-job: dist-x86_64-apple
@rust-bors
Copy link

rust-bors bot commented Dec 12, 2025

☀️ Try build successful (CI)
Build commit: 685739f (685739ff43f91f52e9d32536fdf4f2a4aaa05d4d, parent: 5b150d238fbd4fe7bc2cd3140d8e6fb4406099fa)

@matthiaskrgr
Copy link
Member

weird..
@bors r+ rollup=maybe

@bors
Copy link
Collaborator

bors commented Dec 12, 2025

💡 This pull request was already approved, no need to approve it again.

@bors
Copy link
Collaborator

bors commented Dec 12, 2025

📌 Commit 26c164f 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 12, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 12, 2025
…matthiaskrgr

Clippy subtree update

r? ``@Manishearth``

Cargo.lock update due to Clippy version bump.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 12, 2025
…matthiaskrgr

Clippy subtree update

r? ```@Manishearth```

Cargo.lock update due to Clippy version bump.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 12, 2025
…matthiaskrgr

Clippy subtree update

r? ````@Manishearth````

Cargo.lock update due to Clippy version bump.
bors added a commit that referenced this pull request Dec 12, 2025
Rollup of 7 pull requests

Successful merges:

 - #149655 (bootstrap: add rustc-dev install target)
 - #149789 (Cleanup in the attribute parsers)
 - #149791 (Remove uses of `cfg({any()/all()})`)
 - #149792 (Suggest `cfg(false)` instead of `cfg(FALSE)`)
 - #149883 (add regression test for `proc_macro` error subdiagnostics)
 - #149884 (Clippy subtree update)
 - #149896 (Add myself(makai410) to the review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e0e575c into rust-lang:main Dec 12, 2025
12 of 13 checks passed
@rustbot rustbot added this to the 1.94.0 milestone Dec 12, 2025
rust-timer added a commit that referenced this pull request Dec 12, 2025
Rollup merge of #149884 - flip1995:clippy-subtree-update, r=matthiaskrgr

Clippy subtree update

r? ``````@Manishearth``````

Cargo.lock update due to Clippy version bump.
@bors
Copy link
Collaborator

bors commented Dec 12, 2025

⌛ Testing commit 26c164f with merge 3391c01...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.