Skip to content

Commit 13e9c52

Browse files
committed
Fix dogfood
1 parent 42d1588 commit 13e9c52

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

clippy_lints/src/equatable_if_let.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fn unary_pattern(pat: &Pat<'_>) -> bool {
5151
false
5252
},
5353
PatKind::Struct(_, a, etc) => !etc && a.iter().all(|x| unary_pattern(x.pat)),
54-
PatKind::Tuple(a, etc) | PatKind::TupleStruct(_, a, etc) => !etc.as_opt_usize().is_some() && array_rec(a),
54+
PatKind::Tuple(a, etc) | PatKind::TupleStruct(_, a, etc) => etc.as_opt_usize().is_none() && array_rec(a),
5555
PatKind::Ref(x, _) | PatKind::Box(x) => unary_pattern(x),
5656
PatKind::Path(_) | PatKind::Lit(_) => true,
5757
}

clippy_lints/src/lifetimes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
461461
sub_visitor.visit_fn_decl(decl);
462462
self.nested_elision_site_lts.append(&mut sub_visitor.all_lts());
463463
},
464-
TyKind::TraitObject(bounds, ref lt, _) => {
464+
TyKind::TraitObject(bounds, lt, _) => {
465465
if !lt.is_elided() {
466466
self.unelided_trait_object_lifetime = true;
467467
}

clippy_lints/src/matches/redundant_pattern_match.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -308,15 +308,15 @@ fn find_good_method_for_match<'a>(
308308
should_be_left: &'a str,
309309
should_be_right: &'a str,
310310
) -> Option<&'a str> {
311-
let pat_left = arms[0].pat;
312-
let pat_right = arms[1].pat;
311+
let first_pat = arms[0].pat;
312+
let second_pat = arms[1].pat;
313313

314-
let body_node_pair = if (is_pat_variant(cx, pat_left, path_left, expected_item_left))
315-
&& (is_pat_variant(cx, pat_right, path_right, expected_item_right))
314+
let body_node_pair = if (is_pat_variant(cx, first_pat, path_left, expected_item_left))
315+
&& (is_pat_variant(cx, second_pat, path_right, expected_item_right))
316316
{
317317
(&arms[0].body.kind, &arms[1].body.kind)
318-
} else if (is_pat_variant(cx, pat_left, path_left, expected_item_right))
319-
&& (is_pat_variant(cx, pat_right, path_right, expected_item_left))
318+
} else if (is_pat_variant(cx, first_pat, path_left, expected_item_right))
319+
&& (is_pat_variant(cx, second_pat, path_right, expected_item_left))
320320
{
321321
(&arms[1].body.kind, &arms[0].body.kind)
322322
} else {

clippy_lints/src/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ fn check_ptr_arg_usage<'tcx>(cx: &LateContext<'tcx>, body: &'tcx Body<'_>, args:
669669
}
670670

671671
fn get_rptr_lm<'tcx>(ty: &'tcx hir::Ty<'tcx>) -> Option<(&'tcx Lifetime, Mutability, Span)> {
672-
if let TyKind::Rptr(ref lt, ref m) = ty.kind {
672+
if let TyKind::Rptr(lt, ref m) = ty.kind {
673673
Some((lt, m.mutbl, ty.span))
674674
} else {
675675
None

clippy_lints/src/types/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,7 @@ impl Types {
537537
QPath::LangItem(..) => {},
538538
}
539539
},
540-
TyKind::Rptr(ref lt, ref mut_ty) => {
540+
TyKind::Rptr(lt, ref mut_ty) => {
541541
context.is_nested_call = true;
542542
if !borrowed_box::check(cx, hir_ty, lt, mut_ty) {
543543
self.check_ty(cx, mut_ty.ty, context);

clippy_utils/src/hir_utils.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
962962
mut_ty.mutbl.hash(&mut self.s);
963963
},
964964
TyKind::Rptr(lifetime, ref mut_ty) => {
965-
self.hash_lifetime(*lifetime);
965+
self.hash_lifetime(lifetime);
966966
self.hash_ty(mut_ty.ty);
967967
mut_ty.mutbl.hash(&mut self.s);
968968
},
@@ -992,7 +992,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
992992
in_trait.hash(&mut self.s);
993993
},
994994
TyKind::TraitObject(_, lifetime, _) => {
995-
self.hash_lifetime(*lifetime);
995+
self.hash_lifetime(lifetime);
996996
},
997997
TyKind::Typeof(anon_const) => {
998998
self.hash_body(anon_const.body);

0 commit comments

Comments
 (0)