Skip to content

Commit 9e02abe

Browse files
committed
Auto merge of rust-lang#12726 - kornelski:else_applicable, r=blyxyas
clippy::single_match(_else) may be machine applicable ``` changelog: [`single_match`]: make the lint machine-applicable changelog: [`single_match_else`]: make the lint machine-applicable ``` --- The lint doesn't use placeholders. I've tried it on my codebases, and all instances of it applied without problems.
2 parents 0fc9a65 + b700d9c commit 9e02abe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/matches/single_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ fn report_single_pattern(
7575
) {
7676
let lint = if els.is_some() { SINGLE_MATCH_ELSE } else { SINGLE_MATCH };
7777
let ctxt = expr.span.ctxt();
78-
let mut app = Applicability::HasPlaceholders;
78+
let mut app = Applicability::MachineApplicable;
7979
let els_str = els.map_or(String::new(), |els| {
8080
format!(" else {}", expr_block(cx, els, ctxt, "..", Some(expr.span), &mut app))
8181
});

0 commit comments

Comments
 (0)