From e4794d9d1b8d2ad206ce0aca2afe91d38c6d3420 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 27 Jan 2022 15:46:59 +0000 Subject: [PATCH] Undo a change that is now unnecessary --- compiler/rustc_typeck/src/check/fallback.rs | 2 +- compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs | 2 +- compiler/rustc_typeck/src/check/inherited.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_typeck/src/check/fallback.rs b/compiler/rustc_typeck/src/check/fallback.rs index bbe34977c911..851323178240 100644 --- a/compiler/rustc_typeck/src/check/fallback.rs +++ b/compiler/rustc_typeck/src/check/fallback.rs @@ -218,7 +218,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> { .diverging_type_vars .borrow() .iter() - .map(|(&ty, _)| self.infcx.shallow_resolve(ty)) + .map(|&ty| self.infcx.shallow_resolve(ty)) .filter_map(|ty| ty.ty_vid()) .map(|vid| self.infcx.root_var(vid)) .collect(); diff --git a/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs b/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs index 705b3207999a..e60893a658b3 100644 --- a/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs +++ b/compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs @@ -274,7 +274,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { for a in &adj { if let Adjust::NeverToAny = a.kind { if a.target.is_ty_var() { - self.diverging_type_vars.borrow_mut().insert(a.target, expr.span); + self.diverging_type_vars.borrow_mut().insert(a.target); debug!("apply_adjustments: adding `{:?}` as diverging type var", a.target); } } diff --git a/compiler/rustc_typeck/src/check/inherited.rs b/compiler/rustc_typeck/src/check/inherited.rs index c9b843aedb2d..b775f24f8efd 100644 --- a/compiler/rustc_typeck/src/check/inherited.rs +++ b/compiler/rustc_typeck/src/check/inherited.rs @@ -1,7 +1,7 @@ use super::callee::DeferredCallResolution; use super::MaybeInProgressTables; -use rustc_data_structures::fx::FxHashMap; +use rustc_data_structures::fx::FxHashSet; use rustc_hir as hir; use rustc_hir::def_id::{DefIdMap, LocalDefId}; use rustc_hir::HirIdMap; @@ -58,7 +58,7 @@ pub struct Inherited<'a, 'tcx> { /// Whenever we introduce an adjustment from `!` into a type variable, /// we record that type variable here. This is later used to inform /// fallback. See the `fallback` module for details. - pub(super) diverging_type_vars: RefCell, Span>>, + pub(super) diverging_type_vars: RefCell>>, } impl<'a, 'tcx> Deref for Inherited<'a, 'tcx> {