@@ -157,7 +157,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
157157 attrs : SortedMap :: default ( ) ,
158158 children : Vec :: default ( ) ,
159159 current_hir_id_owner : hir:: CRATE_OWNER_ID ,
160- item_local_id_counter : hir:: ItemLocalId :: new ( 0 ) ,
160+ item_local_id_counter : hir:: ItemLocalId :: ZERO ,
161161 node_id_to_local_id : Default :: default ( ) ,
162162 trait_map : Default :: default ( ) ,
163163
@@ -583,7 +583,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
583583 // and the caller to refer to some of the subdefinitions' nodes' `LocalDefId`s.
584584
585585 // Always allocate the first `HirId` for the owner itself.
586- let _old = self . node_id_to_local_id . insert ( owner, hir:: ItemLocalId :: new ( 0 ) ) ;
586+ let _old = self . node_id_to_local_id . insert ( owner, hir:: ItemLocalId :: ZERO ) ;
587587 debug_assert_eq ! ( _old, None ) ;
588588
589589 let item = f ( self ) ;
@@ -677,7 +677,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
677677 v. insert ( local_id) ;
678678 self . item_local_id_counter . increment_by ( 1 ) ;
679679
680- assert_ne ! ( local_id, hir:: ItemLocalId :: new ( 0 ) ) ;
680+ assert_ne ! ( local_id, hir:: ItemLocalId :: ZERO ) ;
681681 if let Some ( def_id) = self . opt_local_def_id ( ast_node_id) {
682682 self . children . push ( ( def_id, hir:: MaybeOwner :: NonOwner ( hir_id) ) ) ;
683683 }
@@ -696,7 +696,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
696696 fn next_id ( & mut self ) -> hir:: HirId {
697697 let owner = self . current_hir_id_owner ;
698698 let local_id = self . item_local_id_counter ;
699- assert_ne ! ( local_id, hir:: ItemLocalId :: new ( 0 ) ) ;
699+ assert_ne ! ( local_id, hir:: ItemLocalId :: ZERO ) ;
700700 self . item_local_id_counter . increment_by ( 1 ) ;
701701 hir:: HirId { owner, local_id }
702702 }
0 commit comments