Skip to content

Commit e4794d9

Browse files
committed
Undo a change that is now unnecessary
1 parent c564898 commit e4794d9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/rustc_typeck/src/check/fallback.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ impl<'tcx> FnCtxt<'_, 'tcx> {
218218
.diverging_type_vars
219219
.borrow()
220220
.iter()
221-
.map(|(&ty, _)| self.infcx.shallow_resolve(ty))
221+
.map(|&ty| self.infcx.shallow_resolve(ty))
222222
.filter_map(|ty| ty.ty_vid())
223223
.map(|vid| self.infcx.root_var(vid))
224224
.collect();

compiler/rustc_typeck/src/check/fn_ctxt/_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
274274
for a in &adj {
275275
if let Adjust::NeverToAny = a.kind {
276276
if a.target.is_ty_var() {
277-
self.diverging_type_vars.borrow_mut().insert(a.target, expr.span);
277+
self.diverging_type_vars.borrow_mut().insert(a.target);
278278
debug!("apply_adjustments: adding `{:?}` as diverging type var", a.target);
279279
}
280280
}

compiler/rustc_typeck/src/check/inherited.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::callee::DeferredCallResolution;
22
use super::MaybeInProgressTables;
33

4-
use rustc_data_structures::fx::FxHashMap;
4+
use rustc_data_structures::fx::FxHashSet;
55
use rustc_hir as hir;
66
use rustc_hir::def_id::{DefIdMap, LocalDefId};
77
use rustc_hir::HirIdMap;
@@ -58,7 +58,7 @@ pub struct Inherited<'a, 'tcx> {
5858
/// Whenever we introduce an adjustment from `!` into a type variable,
5959
/// we record that type variable here. This is later used to inform
6060
/// fallback. See the `fallback` module for details.
61-
pub(super) diverging_type_vars: RefCell<FxHashMap<Ty<'tcx>, Span>>,
61+
pub(super) diverging_type_vars: RefCell<FxHashSet<Ty<'tcx>>>,
6262
}
6363

6464
impl<'a, 'tcx> Deref for Inherited<'a, 'tcx> {

0 commit comments

Comments
 (0)