Skip to content

Commit 701a579

Browse files
committed
Auto merge of #5150 - krishna-veerareddy:rustup-69004, r=flip1995
Rustup to rust-lang/rust#68911 changelog: none
2 parents ab0cb30 + 46bd185 commit 701a579

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clippy_lints/src/len_zero.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
279279
cx.tcx
280280
.inherent_impls(id)
281281
.iter()
282-
.any(|imp| cx.tcx.associated_items(*imp).any(|item| is_is_empty(cx, &item)))
282+
.any(|imp| cx.tcx.associated_items(*imp).iter().any(|item| is_is_empty(cx, &item)))
283283
}
284284

285285
let ty = &walk_ptrs_ty(cx.tables.expr_ty(expr));
@@ -288,6 +288,7 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
288288
if let Some(principal) = tt.principal() {
289289
cx.tcx
290290
.associated_items(principal.def_id())
291+
.iter()
291292
.any(|item| is_is_empty(cx, &item))
292293
} else {
293294
false

clippy_lints/src/use_self.rs

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ fn check_trait_method_impl_decl<'a, 'tcx>(
125125
let trait_method = cx
126126
.tcx
127127
.associated_items(impl_trait_ref.def_id)
128+
.iter()
128129
.find(|assoc_item| {
129130
assoc_item.kind == ty::AssocKind::Method
130131
&& cx

0 commit comments

Comments
 (0)