about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJason Newcomb <jsnewcomb@pm.me>2025-02-06 20:54:14 +0000
committerGitHub <noreply@github.com>2025-02-06 20:54:14 +0000
commit512b08f8b17b14936787807086e1a963765bd50e (patch)
tree125e7c35673858b81126c19b26c50ab342aabc62
parent888365d7e5a820176107d16f39b0cac5b0979511 (diff)
parentd13897b829c57e7435bb58b310a5639e129075f5 (diff)
downloadrust-512b08f8b17b14936787807086e1a963765bd50e.tar.gz
rust-512b08f8b17b14936787807086e1a963765bd50e.zip
change the applicability of `if_then_some_else_none` to `MachineApplicable` (#14106)
`MachineApplicable` is appropriate for the applicability of this lint.

changelog: [`if_then_some_else_none`]: change the applicability to
`MachineApplicable`
-rw-r--r--clippy_lints/src/if_then_some_else_none.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/if_then_some_else_none.rs b/clippy_lints/src/if_then_some_else_none.rs
index 51e2944e6f9..28e6344186f 100644
--- a/clippy_lints/src/if_then_some_else_none.rs
+++ b/clippy_lints/src/if_then_some_else_none.rs
@@ -94,7 +94,7 @@ impl<'tcx> LateLintPass<'tcx> for IfThenSomeElseNone {
                 expr.span,
                 format!("this could be simplified with `bool::{method_name}`"),
                 |diag| {
-                    let mut app = Applicability::Unspecified;
+                    let mut app = Applicability::MachineApplicable;
                     let cond_snip = Sugg::hir_with_context(cx, cond, expr.span.ctxt(), "[condition]", &mut app)
                         .maybe_par()
                         .to_string();