@@ -1935,10 +1935,10 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
19351935 // We must collect the defaults *before* we do any unification. Because we have
19361936 // directly attached defaults to the type variables any unification that occurs
19371937 // will erase defaults causing conflicting defaults to be completely ignored.
1938- let default_map: FxHashMap < _ , _ > =
1938+ let default_map: FxHashMap < Ty < ' tcx > , _ > =
19391939 unsolved_variables
19401940 . iter ( )
1941- . filter_map ( |t| self . default ( t) . map ( |d| ( t, d) ) )
1941+ . filter_map ( |t| self . default ( t) . map ( |d| ( * t, d) ) )
19421942 . collect ( ) ;
19431943
19441944 let mut unbound_tyvars = FxHashSet ( ) ;
@@ -2068,7 +2068,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
20682068 fn apply_defaults_and_return_conflicts < ' b > (
20692069 & ' b self ,
20702070 unbound_vars : & ' b FxHashSet < Ty < ' tcx > > ,
2071- default_map : & ' b FxHashMap < & ' b Ty < ' tcx > , type_variable:: Default < ' tcx > > ,
2071+ default_map : & ' b FxHashMap < Ty < ' tcx > , type_variable:: Default < ' tcx > > ,
20722072 conflict : Option < Ty < ' tcx > > ,
20732073 ) -> impl Iterator < Item =( Ty < ' tcx > , type_variable:: Default < ' tcx > ) > + ' b {
20742074 use rustc:: ty:: error:: UnconstrainedNumeric :: Neither ;
@@ -2087,7 +2087,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
20872087 self . demand_eqtype ( syntax_pos:: DUMMY_SP , ty, self . tcx . types . f64 )
20882088 } ,
20892089 Neither => {
2090- if let Some ( default) = default_map. get ( & ty) {
2090+ if let Some ( default) = default_map. get ( ty) {
20912091 let default = default. clone ( ) ;
20922092 let default_ty = self . normalize_associated_types_in (
20932093 default. origin_span , & default. ty ) ;
0 commit comments