about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-14 22:12:25 +0000
committerbors <bors@rust-lang.org>2022-03-14 22:12:25 +0000
commit0e1311b70f0b11cae18b0f7703ceed34b19eef37 (patch)
tree44b6409db83eff9fe846057fa7b2bf9c2330eea8
parentdc5423ad448877e33cca28db2f1445c9c4473c75 (diff)
parentfc5540a4d3ae28e5dbf127b6fcddcae41baf218f (diff)
downloadrust-0e1311b70f0b11cae18b0f7703ceed34b19eef37.tar.gz
rust-0e1311b70f0b11cae18b0f7703ceed34b19eef37.zip
Auto merge of #8536 - xFrednet:8062-applicability-search-is-some, r=camsteffen
Make `search_is_some`s suggestion `MachineApplicable`

My biggest PR to date, about 0.3 Lines have been changed!

Closes https://github.com/rust-lang/rust-clippy/issues/8062

The suggestion seems to work well, as we've received no error reports since the implementation in December. This PR therefore promotes the suggestion to `MachineApplicable`. The tests already include `.fixed` files :)

changelog: [`search_is_some`]: Make more suggestions `MachineApplicable`
-rw-r--r--clippy_utils/src/sugg.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/sugg.rs b/clippy_utils/src/sugg.rs
index 63c442e7008..1fc9979f3dd 100644
--- a/clippy_utils/src/sugg.rs
+++ b/clippy_utils/src/sugg.rs
@@ -808,7 +808,7 @@ pub fn deref_closure_args<'tcx>(cx: &LateContext<'_>, closure: &'tcx hir::Expr<'
             closure_arg_is_type_annotated_double_ref,
             next_pos: closure.span.lo(),
             suggestion_start: String::new(),
-            applicability: Applicability::MaybeIncorrect,
+            applicability: Applicability::MachineApplicable,
         };
 
         let fn_def_id = cx.tcx.hir().local_def_id(closure.hir_id);