@@ -157,7 +157,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
157
157
attrs : SortedMap :: default ( ) ,
158
158
children : Vec :: default ( ) ,
159
159
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 ,
161
161
node_id_to_local_id : Default :: default ( ) ,
162
162
trait_map : Default :: default ( ) ,
163
163
@@ -583,7 +583,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
583
583
// and the caller to refer to some of the subdefinitions' nodes' `LocalDefId`s.
584
584
585
585
// 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 ) ;
587
587
debug_assert_eq ! ( _old, None ) ;
588
588
589
589
let item = f ( self ) ;
@@ -677,7 +677,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
677
677
v. insert ( local_id) ;
678
678
self . item_local_id_counter . increment_by ( 1 ) ;
679
679
680
- assert_ne ! ( local_id, hir:: ItemLocalId :: new ( 0 ) ) ;
680
+ assert_ne ! ( local_id, hir:: ItemLocalId :: ZERO ) ;
681
681
if let Some ( def_id) = self . opt_local_def_id ( ast_node_id) {
682
682
self . children . push ( ( def_id, hir:: MaybeOwner :: NonOwner ( hir_id) ) ) ;
683
683
}
@@ -696,7 +696,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
696
696
fn next_id ( & mut self ) -> hir:: HirId {
697
697
let owner = self . current_hir_id_owner ;
698
698
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 ) ;
700
700
self . item_local_id_counter . increment_by ( 1 ) ;
701
701
hir:: HirId { owner, local_id }
702
702
}
0 commit comments