Skip to content

Skip unused_allocation lint when method takes &Box<Self>#151886

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
chenyukang:yukang-fix-151846-unused-allocation-box-ref
Feb 1, 2026
Merged

Skip unused_allocation lint when method takes &Box<Self>#151886
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
chenyukang:yukang-fix-151846-unused-allocation-box-ref

Conversation

@chenyukang
Copy link
Member

@chenyukang chenyukang commented Jan 31, 2026

Fixes #151846

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 31, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 2026

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@petrochenkov
Copy link
Contributor

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 31, 2026

📌 Commit 91feb76 has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Jan 31, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jan 31, 2026
…d-allocation-box-ref, r=petrochenkov

Skip unused_allocation lint when method takes &Box<Self>

Fixes rust-lang#151846
rust-bors bot pushed a commit that referenced this pull request Jan 31, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #149596 (resolve: Report more visibility-related early resolution ambiguities for imports)
 - #151886 (Skip unused_allocation lint when method takes &Box<Self>)
 - #151102 (Feature-gate `mut ref` patterns in struct pattern field shorthand)
rust-bors bot pushed a commit that referenced this pull request Jan 31, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #151886 (Skip unused_allocation lint when method takes &Box<Self>)
 - #150300 (Constify `fmt::from_fn`)
 - #151102 (Feature-gate `mut ref` patterns in struct pattern field shorthand)
 - #151866 (Reorganizing `tests/ui/issues` 10 tests [4/N] )
 - #151890 (Re-export `hashbrown::hash_table` from `rustc_data_structures`)
@rust-bors rust-bors bot merged commit 1c6f67f into rust-lang:main Feb 1, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 1, 2026
rust-timer added a commit that referenced this pull request Feb 1, 2026
Rollup merge of #151886 - chenyukang:yukang-fix-151846-unused-allocation-box-ref, r=petrochenkov

Skip unused_allocation lint when method takes &Box<Self>

Fixes #151846
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

unused_allocation warning should ignore allocations to pass Box to things taking self: &Box

3 participants