From 52fb7d461ea231310de16e721e3b850747f5cf41 Mon Sep 17 00:00:00 2001 From: Vitaly _Vi Shukela Date: Tue, 18 Sep 2018 22:43:52 +0300 Subject: [PATCH] Applicability adjustment per additional comments --- clippy_lints/src/large_enum_variant.rs | 2 +- clippy_lints/src/let_if_seq.rs | 2 +- clippy_lints/src/matches.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clippy_lints/src/large_enum_variant.rs b/clippy_lints/src/large_enum_variant.rs index c346585250a..8ff53e15c31 100644 --- a/clippy_lints/src/large_enum_variant.rs +++ b/clippy_lints/src/large_enum_variant.rs @@ -102,7 +102,7 @@ fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &Item) { "consider boxing the large fields to reduce the total size of the \ enum", format!("Box<{}>", snip), - Applicability::MachineApplicable, + Applicability::Unspecified, ); return; } diff --git a/clippy_lints/src/let_if_seq.rs b/clippy_lints/src/let_if_seq.rs index ede55ce3721..53d13407be3 100644 --- a/clippy_lints/src/let_if_seq.rs +++ b/clippy_lints/src/let_if_seq.rs @@ -125,7 +125,7 @@ fn check_block(&mut self, cx: &LateContext<'a, 'tcx>, block: &'tcx hir::Block) { span, "it is more idiomatic to write", sug, - Applicability::MaybeIncorrect, + Applicability::HasPlaceholders, ); if !mutability.is_empty() { db.note("you might not need `mut` at all"); diff --git a/clippy_lints/src/matches.rs b/clippy_lints/src/matches.rs index 4c99aeae199..c1a65e756a9 100644 --- a/clippy_lints/src/matches.rs +++ b/clippy_lints/src/matches.rs @@ -344,7 +344,7 @@ fn check_match_bool(cx: &LateContext<'_, '_>, ex: &Expr, arms: &[Arm], expr: &Ex expr.span, "consider using an if/else expression", sugg, - Applicability::MaybeIncorrect, // not sure + Applicability::HasPlaceholders, ); } }