From 403ae37ce8f680e378dc77904a27453df0867b99 Mon Sep 17 00:00:00 2001 From: Mark Simulacrum Date: Sun, 5 Mar 2017 10:36:31 -0700 Subject: [PATCH] Remove reference to Ty. --- src/librustc_typeck/check/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs index ae4cb48b7c60e..2b9ccf6d3e246 100644 --- a/src/librustc_typeck/check/mod.rs +++ b/src/librustc_typeck/check/mod.rs @@ -1935,10 +1935,10 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { // We must collect the defaults *before* we do any unification. Because we have // directly attached defaults to the type variables any unification that occurs // will erase defaults causing conflicting defaults to be completely ignored. - let default_map: FxHashMap<_, _> = + let default_map: FxHashMap, _> = unsolved_variables .iter() - .filter_map(|t| self.default(t).map(|d| (t, d))) + .filter_map(|t| self.default(t).map(|d| (*t, d))) .collect(); let mut unbound_tyvars = FxHashSet(); @@ -2068,7 +2068,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { fn apply_defaults_and_return_conflicts<'b>( &'b self, unbound_vars: &'b FxHashSet>, - default_map: &'b FxHashMap<&'b Ty<'tcx>, type_variable::Default<'tcx>>, + default_map: &'b FxHashMap, type_variable::Default<'tcx>>, conflict: Option>, ) -> impl Iterator, type_variable::Default<'tcx>)> + 'b { use rustc::ty::error::UnconstrainedNumeric::Neither; @@ -2087,7 +2087,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> { self.demand_eqtype(syntax_pos::DUMMY_SP, ty, self.tcx.types.f64) }, Neither => { - if let Some(default) = default_map.get(&ty) { + if let Some(default) = default_map.get(ty) { let default = default.clone(); let default_ty = self.normalize_associated_types_in( default.origin_span, &default.ty);