@@ -244,9 +244,9 @@ pub fn lower_crate(
244244 loop_scopes : Vec :: new ( ) ,
245245 is_in_loop_condition : false ,
246246 anonymous_lifetime_mode : AnonymousLifetimeMode :: PassThrough ,
247- type_def_lifetime_params : DefIdMap ( ) ,
247+ type_def_lifetime_params : Default :: default ( ) ,
248248 current_hir_id_owner : vec ! [ ( CRATE_DEF_INDEX , 0 ) ] ,
249- item_local_id_counters : NodeMap ( ) ,
249+ item_local_id_counters : Default :: default ( ) ,
250250 node_id_to_hir_id : IndexVec :: new ( ) ,
251251 is_generator : false ,
252252 is_in_trait_impl : false ,
@@ -1168,7 +1168,7 @@ impl<'a> LoweringContext<'a> {
11681168 hir:: TyKind :: BareFn ( P ( hir:: BareFnTy {
11691169 generic_params : this. lower_generic_params (
11701170 & f. generic_params ,
1171- & NodeMap ( ) ,
1171+ & NodeMap :: default ( ) ,
11721172 ImplTraitContext :: disallowed ( ) ,
11731173 ) ,
11741174 unsafety : this. lower_unsafety ( f. unsafety ) ,
@@ -2467,7 +2467,7 @@ impl<'a> LoweringContext<'a> {
24672467 // FIXME: This could probably be done with less rightward drift. Also looks like two control
24682468 // paths where report_error is called are also the only paths that advance to after
24692469 // 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 ( ) ;
24712471 for pred in & generics. where_clause . predicates {
24722472 if let WherePredicate :: BoundPredicate ( ref bound_pred) = * pred {
24732473 ' next_bound: for bound in & bound_pred. bounds {
@@ -2552,7 +2552,7 @@ impl<'a> LoweringContext<'a> {
25522552 hir:: WherePredicate :: BoundPredicate ( hir:: WhereBoundPredicate {
25532553 bound_generic_params : this. lower_generic_params (
25542554 bound_generic_params,
2555- & NodeMap ( ) ,
2555+ & NodeMap :: default ( ) ,
25562556 ImplTraitContext :: disallowed ( ) ,
25572557 ) ,
25582558 bounded_ty : this. lower_ty ( bounded_ty, ImplTraitContext :: disallowed ( ) ) ,
@@ -2636,8 +2636,11 @@ impl<'a> LoweringContext<'a> {
26362636 p : & PolyTraitRef ,
26372637 mut itctx : ImplTraitContext < ' _ > ,
26382638 ) -> 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+ ) ;
26412644 let trait_ref = self . with_parent_impl_lifetime_defs (
26422645 & bound_generic_params,
26432646 |this| this. lower_trait_ref ( & p. trait_ref , itctx) ,
0 commit comments