about summary refs log tree commit diff
path: root/clippy_lints/src/index_refutable_slice.rs
diff options
context:
space:
mode:
authorxFrednet <xFrednet@gmail.com>2022-05-20 20:37:38 +0200
committerxFrednet <xFrednet@gmail.com>2022-05-20 20:47:31 +0200
commit4e6cf0036e5e7afdc4fe86cccc99482ff4cf71bf (patch)
treec0de46a0482ccc460d4789e23b4d2abb5bf17787 /clippy_lints/src/index_refutable_slice.rs
parent01421e0cbda66655e25d48c1c72c2dcbe77040c2 (diff)
parent6f26383f8ec8dfe89858876eac127161d148eb13 (diff)
downloadrust-4e6cf0036e5e7afdc4fe86cccc99482ff4cf71bf.tar.gz
rust-4e6cf0036e5e7afdc4fe86cccc99482ff4cf71bf.zip
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/index_refutable_slice.rs')
-rw-r--r--clippy_lints/src/index_refutable_slice.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/clippy_lints/src/index_refutable_slice.rs b/clippy_lints/src/index_refutable_slice.rs
index 8a84513b779..9ce5b8e17a9 100644
--- a/clippy_lints/src/index_refutable_slice.rs
+++ b/clippy_lints/src/index_refutable_slice.rs
@@ -14,7 +14,6 @@ use rustc_middle::ty;
 use rustc_semver::RustcVersion;
 use rustc_session::{declare_tool_lint, impl_lint_pass};
 use rustc_span::{symbol::Ident, Span};
-use std::convert::TryInto;
 
 declare_clippy_lint! {
     /// ### What it does
@@ -75,7 +74,7 @@ impl<'tcx> LateLintPass<'tcx> for IndexRefutableSlice {
             if !expr.span.from_expansion() || is_expn_of(expr.span, "if_chain").is_some();
             if let Some(IfLet {let_pat, if_then, ..}) = IfLet::hir(cx, expr);
             if !is_lint_allowed(cx, INDEX_REFUTABLE_SLICE, expr.hir_id);
-            if meets_msrv(self.msrv.as_ref(), &msrvs::SLICE_PATTERNS);
+            if meets_msrv(self.msrv, msrvs::SLICE_PATTERNS);
 
             let found_slices = find_slice_values(cx, let_pat);
             if !found_slices.is_empty();