about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEduardo Broto <ebroto@tutanota.com>2020-09-27 15:20:19 +0200
committerEduardo Broto <ebroto@tutanota.com>2020-09-27 15:22:33 +0200
commit8bf27c5e92af39215a3d1da992a7207dafc883e1 (patch)
treef57c7979ed924020348eff137aca86d0c323fbc6
parentcd4706413fb891ffe33ef06e0c229d97258fbfaf (diff)
downloadrust-8bf27c5e92af39215a3d1da992a7207dafc883e1.tar.gz
rust-8bf27c5e92af39215a3d1da992a7207dafc883e1.zip
Fix dogfood
-rw-r--r--clippy_lints/src/utils/qualify_min_const_fn.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/clippy_lints/src/utils/qualify_min_const_fn.rs b/clippy_lints/src/utils/qualify_min_const_fn.rs
index c1684575930..3773b9d9a2e 100644
--- a/clippy_lints/src/utils/qualify_min_const_fn.rs
+++ b/clippy_lints/src/utils/qualify_min_const_fn.rs
@@ -1,6 +1,9 @@
 use rustc_hir as hir;
 use rustc_hir::def_id::DefId;
-use rustc_middle::mir::*;
+use rustc_middle::mir::{
+    Body, CastKind, NullOp, Operand, Place, ProjectionElem, Rvalue, Statement, StatementKind, Terminator,
+    TerminatorKind,
+};
 use rustc_middle::ty::subst::GenericArgKind;
 use rustc_middle::ty::{self, adjustment::PointerCast, Ty, TyCtxt};
 use rustc_span::symbol::sym;
@@ -208,8 +211,7 @@ fn check_statement(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, statemen
             check_rvalue(tcx, body, def_id, rval, span)
         },
 
-        StatementKind::FakeRead(_, place) => check_place(tcx, **place, span, body),
-
+        StatementKind::FakeRead(_, place) |
         // just an assignment
         StatementKind::SetDiscriminant { place, .. } => check_place(tcx, **place, span, body),
 
@@ -237,7 +239,7 @@ fn check_operand(tcx: TyCtxt<'tcx>, operand: &Operand<'tcx>, span: Span, body: &
 
 fn check_place(tcx: TyCtxt<'tcx>, place: Place<'tcx>, span: Span, body: &Body<'tcx>) -> McfResult {
     let mut cursor = place.projection.as_ref();
-    while let &[ref proj_base @ .., elem] = cursor {
+    while let [ref proj_base @ .., elem] = *cursor {
         cursor = proj_base;
         match elem {
             ProjectionElem::Field(..) => {