@@ -244,9 +244,9 @@ pub fn lower_crate(
244
244
loop_scopes : Vec :: new ( ) ,
245
245
is_in_loop_condition : false ,
246
246
anonymous_lifetime_mode : AnonymousLifetimeMode :: PassThrough ,
247
- type_def_lifetime_params : DefIdMap ( ) ,
247
+ type_def_lifetime_params : Default :: default ( ) ,
248
248
current_hir_id_owner : vec ! [ ( CRATE_DEF_INDEX , 0 ) ] ,
249
- item_local_id_counters : NodeMap ( ) ,
249
+ item_local_id_counters : Default :: default ( ) ,
250
250
node_id_to_hir_id : IndexVec :: new ( ) ,
251
251
is_generator : false ,
252
252
is_in_trait_impl : false ,
@@ -1168,7 +1168,7 @@ impl<'a> LoweringContext<'a> {
1168
1168
hir:: TyKind :: BareFn ( P ( hir:: BareFnTy {
1169
1169
generic_params : this. lower_generic_params (
1170
1170
& f. generic_params ,
1171
- & NodeMap ( ) ,
1171
+ & NodeMap :: default ( ) ,
1172
1172
ImplTraitContext :: disallowed ( ) ,
1173
1173
) ,
1174
1174
unsafety : this. lower_unsafety ( f. unsafety ) ,
@@ -2467,7 +2467,7 @@ impl<'a> LoweringContext<'a> {
2467
2467
// FIXME: This could probably be done with less rightward drift. Also looks like two control
2468
2468
// paths where report_error is called are also the only paths that advance to after
2469
2469
// the match statement, so the error reporting could probably just be moved there.
2470
- let mut add_bounds: NodeMap < Vec < _ > > = NodeMap ( ) ;
2470
+ let mut add_bounds: NodeMap < Vec < _ > > = Default :: default ( ) ;
2471
2471
for pred in & generics. where_clause . predicates {
2472
2472
if let WherePredicate :: BoundPredicate ( ref bound_pred) = * pred {
2473
2473
' next_bound: for bound in & bound_pred. bounds {
@@ -2552,7 +2552,7 @@ impl<'a> LoweringContext<'a> {
2552
2552
hir:: WherePredicate :: BoundPredicate ( hir:: WhereBoundPredicate {
2553
2553
bound_generic_params : this. lower_generic_params (
2554
2554
bound_generic_params,
2555
- & NodeMap ( ) ,
2555
+ & NodeMap :: default ( ) ,
2556
2556
ImplTraitContext :: disallowed ( ) ,
2557
2557
) ,
2558
2558
bounded_ty : this. lower_ty ( bounded_ty, ImplTraitContext :: disallowed ( ) ) ,
@@ -2636,8 +2636,11 @@ impl<'a> LoweringContext<'a> {
2636
2636
p : & PolyTraitRef ,
2637
2637
mut itctx : ImplTraitContext < ' _ > ,
2638
2638
) -> hir:: PolyTraitRef {
2639
- let bound_generic_params =
2640
- self . lower_generic_params ( & p. bound_generic_params , & NodeMap ( ) , itctx. reborrow ( ) ) ;
2639
+ let bound_generic_params = self . lower_generic_params (
2640
+ & p. bound_generic_params ,
2641
+ & NodeMap :: default ( ) ,
2642
+ itctx. reborrow ( ) ,
2643
+ ) ;
2641
2644
let trait_ref = self . with_parent_impl_lifetime_defs (
2642
2645
& bound_generic_params,
2643
2646
|this| this. lower_trait_ref ( & p. trait_ref , itctx) ,
0 commit comments