mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
Auto merge of #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.
This commit is contained in:
commit
9e02abec3e
@ -75,7 +75,7 @@ fn report_single_pattern(
|
||||
) {
|
||||
let lint = if els.is_some() { SINGLE_MATCH_ELSE } else { SINGLE_MATCH };
|
||||
let ctxt = expr.span.ctxt();
|
||||
let mut app = Applicability::HasPlaceholders;
|
||||
let mut app = Applicability::MachineApplicable;
|
||||
let els_str = els.map_or(String::new(), |els| {
|
||||
format!(" else {}", expr_block(cx, els, ctxt, "..", Some(expr.span), &mut app))
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user