Skip to content

Suppress unused_mut lint if mutation fails due to borrowck error#152037

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
eggyal:unused-mut-due-to-borrowck-error
Feb 8, 2026
Merged

Suppress unused_mut lint if mutation fails due to borrowck error#152037
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
eggyal:unused-mut-due-to-borrowck-error

Conversation

@eggyal
Copy link
Contributor

@eggyal eggyal commented Feb 3, 2026

Remedying the borrowck error will likely result in the mut becoming used, and therefore the lint is likely incorrect.

Fixes #152024
r? compiler

Remedying the borrowck error will likely result in the mut becoming
used.
@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 Feb 3, 2026
@jackh726
Copy link
Member

jackh726 commented Feb 8, 2026

@bors r+

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 8, 2026

📌 Commit 5405e5d has been approved by jackh726

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 Feb 8, 2026
rust-bors bot pushed a commit that referenced this pull request Feb 8, 2026
Rollup of 5 pull requests

Successful merges:

 - #150443 (Support long diff conflict markers)
 - #151887 (Remove some unnecessary `try`-related type annotations)
 - #152037 (Suppress unused_mut lint if mutation fails due to borrowck error)
 - #152067 (Weaken `assert_dep_node_not_yet_allocated_in_current_session` for multiple threads)
 - #151227 (Document `-Zcache-proc-macros`)
@rust-bors rust-bors bot merged commit 8e16ea8 into rust-lang:main Feb 8, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 8, 2026
rust-timer added a commit that referenced this pull request Feb 8, 2026
Rollup merge of #152037 - eggyal:unused-mut-due-to-borrowck-error, r=jackh726

Suppress unused_mut lint if mutation fails due to borrowck error

Remedying the borrowck error will likely result in the mut becoming used, and therefore the lint is likely incorrect.

Fixes #152024
r? compiler
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_mut false positive due to borrow-checking error

3 participants