Skip to content

Commit 6b3cf63

Browse files
committed
Fix dogfood fallout
1 parent c00268d commit 6b3cf63

File tree

1 file changed

+8
-11
lines changed
  • clippy_lints/src/methods

1 file changed

+8
-11
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,17 +1496,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Methods {
14961496
if let ty::Opaque(def_id, _) = ret_ty.kind {
14971497
// one of the associated types must be Self
14981498
for predicate in cx.tcx.predicates_of(def_id).predicates {
1499-
match predicate.0.kind() {
1500-
ty::PredicateKind::Projection(poly_projection_predicate) => {
1501-
let binder = poly_projection_predicate.ty();
1502-
let associated_type = binder.skip_binder();
1503-
1504-
// walk the associated type and check for Self
1505-
if contains_self_ty(associated_type) {
1506-
return;
1507-
}
1508-
},
1509-
_ => {},
1499+
if let ty::PredicateKind::Projection(poly_projection_predicate) = predicate.0.kind() {
1500+
let binder = poly_projection_predicate.ty();
1501+
let associated_type = binder.skip_binder();
1502+
1503+
// walk the associated type and check for Self
1504+
if contains_self_ty(associated_type) {
1505+
return;
1506+
}
15101507
}
15111508
}
15121509
}

0 commit comments

Comments
 (0)