Skip to content

internal: remove redundant disable 'unused_variables' - #23283

Merged
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
A4-Tacks:redundant-unused-var
Sep 3, 2026
Merged

internal: remove redundant disable 'unused_variables'#23283
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
A4-Tacks:redundant-unused-var

Conversation

@A4-Tacks

@A4-Tacks A4-Tacks commented Sep 3, 2026

Copy link
Copy Markdown
Member

Fixup #23043


BTW, #23043 has another advantage, it won't be caught by unused_variables's fix when applying line quick fix

fn main() {
    $0let Some(x) = Some(2);
}

Before:

fn main() {
    let Some(_x) = Some(2);
}

After (better):

fn main() {
    let Some(x) = Some(2) else { return };
}

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2026
@ChayimFriedman2
ChayimFriedman2 added this pull request to the merge queue Sep 3, 2026
Merged via the queue into rust-lang:master with commit ea4b275 Sep 3, 2026
19 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 3, 2026
@A4-Tacks
A4-Tacks deleted the redundant-unused-var branch September 3, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants