Undo a change that is now unnecessary
This commit is contained in:
parent
c564898110
commit
e4794d9d1b
3 changed files with 4 additions and 4 deletions
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<FxHashMap<Ty<'tcx>, Span>>,
|
||||
pub(super) diverging_type_vars: RefCell<FxHashSet<Ty<'tcx>>>,
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> Deref for Inherited<'a, 'tcx> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue