diff options
| author | Dániel Buga <bugadani@gmail.com> | 2021-01-22 08:14:25 +0100 |
|---|---|---|
| committer | Dániel Buga <bugadani@gmail.com> | 2021-01-22 08:14:25 +0100 |
| commit | 58a90de9adfac7cc26fe178b3f736153b756a515 (patch) | |
| tree | 5f2e05b2d8a0eeb486841486cc8d400a6eeb0c56 | |
| parent | 3e9f27dadfea2921649837c1a282ad159ceb8684 (diff) | |
| download | rust-58a90de9adfac7cc26fe178b3f736153b756a515.tar.gz rust-58a90de9adfac7cc26fe178b3f736153b756a515.zip | |
No peeking
| -rw-r--r-- | compiler/rustc_typeck/src/check/check.rs | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/rustc_typeck/src/check/check.rs b/compiler/rustc_typeck/src/check/check.rs index 279c4422fe1..e89a063598a 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 { |
