From 46bd185e32b03916be15fca6ddd7c6d011795ac8 Mon Sep 17 00:00:00 2001 From: Krishna Sai Veera Reddy Date: Sun, 9 Feb 2020 14:44:17 -0800 Subject: [PATCH] Rustup to rust-lang/rust#68911 --- clippy_lints/src/len_zero.rs | 3 ++- clippy_lints/src/use_self.rs | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clippy_lints/src/len_zero.rs b/clippy_lints/src/len_zero.rs index b522a74fb0e8..2d381148012c 100644 --- a/clippy_lints/src/len_zero.rs +++ b/clippy_lints/src/len_zero.rs @@ -279,7 +279,7 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool { cx.tcx .inherent_impls(id) .iter() - .any(|imp| cx.tcx.associated_items(*imp).any(|item| is_is_empty(cx, &item))) + .any(|imp| cx.tcx.associated_items(*imp).iter().any(|item| is_is_empty(cx, &item))) } let ty = &walk_ptrs_ty(cx.tables.expr_ty(expr)); @@ -288,6 +288,7 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool { if let Some(principal) = tt.principal() { cx.tcx .associated_items(principal.def_id()) + .iter() .any(|item| is_is_empty(cx, &item)) } else { false diff --git a/clippy_lints/src/use_self.rs b/clippy_lints/src/use_self.rs index 4160370dd15a..9be070bd3d15 100644 --- a/clippy_lints/src/use_self.rs +++ b/clippy_lints/src/use_self.rs @@ -125,6 +125,7 @@ fn check_trait_method_impl_decl<'a, 'tcx>( let trait_method = cx .tcx .associated_items(impl_trait_ref.def_id) + .iter() .find(|assoc_item| { assoc_item.kind == ty::AssocKind::Method && cx