Skip to content

Commit 8bf27c5

Browse files
committed
Fix dogfood
1 parent cd47064 commit 8bf27c5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

clippy_lints/src/utils/qualify_min_const_fn.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use rustc_hir as hir;
22
use rustc_hir::def_id::DefId;
3-
use rustc_middle::mir::*;
3+
use rustc_middle::mir::{
4+
Body, CastKind, NullOp, Operand, Place, ProjectionElem, Rvalue, Statement, StatementKind, Terminator,
5+
TerminatorKind,
6+
};
47
use rustc_middle::ty::subst::GenericArgKind;
58
use rustc_middle::ty::{self, adjustment::PointerCast, Ty, TyCtxt};
69
use rustc_span::symbol::sym;
@@ -208,8 +211,7 @@ fn check_statement(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, def_id: DefId, statemen
208211
check_rvalue(tcx, body, def_id, rval, span)
209212
},
210213

211-
StatementKind::FakeRead(_, place) => check_place(tcx, **place, span, body),
212-
214+
StatementKind::FakeRead(_, place) |
213215
// just an assignment
214216
StatementKind::SetDiscriminant { place, .. } => check_place(tcx, **place, span, body),
215217

@@ -237,7 +239,7 @@ fn check_operand(tcx: TyCtxt<'tcx>, operand: &Operand<'tcx>, span: Span, body: &
237239

238240
fn check_place(tcx: TyCtxt<'tcx>, place: Place<'tcx>, span: Span, body: &Body<'tcx>) -> McfResult {
239241
let mut cursor = place.projection.as_ref();
240-
while let &[ref proj_base @ .., elem] = cursor {
242+
while let [ref proj_base @ .., elem] = *cursor {
241243
cursor = proj_base;
242244
match elem {
243245
ProjectionElem::Field(..) => {

0 commit comments

Comments
 (0)