@@ -1935,10 +1935,10 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
1935
1935
// We must collect the defaults *before* we do any unification. Because we have
1936
1936
// directly attached defaults to the type variables any unification that occurs
1937
1937
// will erase defaults causing conflicting defaults to be completely ignored.
1938
- let default_map: FxHashMap < _ , _ > =
1938
+ let default_map: FxHashMap < Ty < ' tcx > , _ > =
1939
1939
unsolved_variables
1940
1940
. iter ( )
1941
- . filter_map ( |t| self . default ( t) . map ( |d| ( t, d) ) )
1941
+ . filter_map ( |t| self . default ( t) . map ( |d| ( * t, d) ) )
1942
1942
. collect ( ) ;
1943
1943
1944
1944
let mut unbound_tyvars = FxHashSet ( ) ;
@@ -2068,7 +2068,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
2068
2068
fn apply_defaults_and_return_conflicts < ' b > (
2069
2069
& ' b self ,
2070
2070
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 > > ,
2072
2072
conflict : Option < Ty < ' tcx > > ,
2073
2073
) -> impl Iterator < Item =( Ty < ' tcx > , type_variable:: Default < ' tcx > ) > + ' b {
2074
2074
use rustc:: ty:: error:: UnconstrainedNumeric :: Neither ;
@@ -2087,7 +2087,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
2087
2087
self . demand_eqtype ( syntax_pos:: DUMMY_SP , ty, self . tcx . types . f64 )
2088
2088
} ,
2089
2089
Neither => {
2090
- if let Some ( default) = default_map. get ( & ty) {
2090
+ if let Some ( default) = default_map. get ( ty) {
2091
2091
let default = default. clone ( ) ;
2092
2092
let default_ty = self . normalize_associated_types_in (
2093
2093
default. origin_span , & default. ty ) ;
0 commit comments