From 58a90de9adfac7cc26fe178b3f736153b756a515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C3=A1niel=20Buga?= Date: Fri, 22 Jan 2021 08:14:25 +0100 Subject: [PATCH] No peeking --- compiler/rustc_typeck/src/check/check.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/compiler/rustc_typeck/src/check/check.rs b/compiler/rustc_typeck/src/check/check.rs index 279c4422fe12..e89a063598ab 100644 --- a/compiler/rustc_typeck/src/check/check.rs +++ b/compiler/rustc_typeck/src/check/check.rs @@ -854,13 +854,7 @@ pub(super) fn check_specialization_validity<'tcx>( } else { Some((parent, parent.item(tcx, trait_item.ident, kind, trait_def.def_id))) } - }) - .peekable(); - - if ancestor_impls.peek().is_none() { - // No parent, nothing to specialize. - return; - } + }); let opt_result = ancestor_impls.find_map(|(parent_impl, parent_item)| { match parent_item {