File tree 7 files changed +7
-7
lines changed
7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ impl<'hir> Map<'hir> {
346
346
}
347
347
348
348
fn get_entry ( & self , id : HirId ) -> Entry < ' hir > {
349
- if id. local_id == ItemLocalId :: from_u32_const ( 0 ) {
349
+ if id. local_id == ItemLocalId :: from_u32 ( 0 ) {
350
350
let owner = self . tcx . hir_owner ( id. owner_def_id ( ) ) ;
351
351
Entry { parent : owner. parent , node : owner. node }
352
352
} else {
Original file line number Diff line number Diff line change @@ -1697,7 +1697,7 @@ rustc_index::newtype_index! {
1697
1697
}
1698
1698
1699
1699
impl UniverseIndex {
1700
- pub const ROOT : UniverseIndex = UniverseIndex :: from_u32_const ( 0 ) ;
1700
+ pub const ROOT : UniverseIndex = UniverseIndex :: from_u32 ( 0 ) ;
1701
1701
1702
1702
/// Returns the "next" universe index in order -- this new index
1703
1703
/// is considered to extend all previous universes. This
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ rustc_index::newtype_index! {
12
12
rustc_data_structures:: define_id_collections!( NodeMap , NodeSet , NodeId ) ;
13
13
14
14
/// `NodeId` used to represent the root of the crate.
15
- pub const CRATE_NODE_ID : NodeId = NodeId :: from_u32_const ( 0 ) ;
15
+ pub const CRATE_NODE_ID : NodeId = NodeId :: from_u32 ( 0 ) ;
16
16
17
17
/// When parsing and doing expansions, we initially give all AST nodes this AST
18
18
/// node value. Then later, in the renumber pass, we renumber them to have
Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ rustc_data_structures::impl_stable_hash_via_hash!(ItemLocalId);
71
71
72
72
/// The `HirId` corresponding to `CRATE_NODE_ID` and `CRATE_DEF_INDEX`.
73
73
pub const CRATE_HIR_ID : HirId =
74
- HirId { owner : CRATE_DEF_INDEX , local_id : ItemLocalId :: from_u32_const ( 0 ) } ;
74
+ HirId { owner : CRATE_DEF_INDEX , local_id : ItemLocalId :: from_u32 ( 0 ) } ;
75
75
76
76
pub const DUMMY_HIR_ID : HirId = HirId { owner : CRATE_DEF_INDEX , local_id : DUMMY_ITEM_LOCAL_ID } ;
77
77
Original file line number Diff line number Diff line change @@ -482,7 +482,7 @@ macro_rules! newtype_index {
482
482
const $name: ident = $constant: expr,
483
483
$( $tokens: tt) * ) => (
484
484
$( #[ doc = $doc] ) *
485
- $v const $name: $type = $type:: from_u32_const ( $constant) ;
485
+ $v const $name: $type = $type:: from_u32 ( $constant) ;
486
486
$crate:: newtype_index!(
487
487
@derives [ $( $derives, ) * ]
488
488
@attrs [ $( #[ $attrs] ) * ]
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ pub enum CrateNum {
25
25
26
26
/// Item definitions in the currently-compiled crate would have the `CrateNum`
27
27
/// `LOCAL_CRATE` in their `DefId`.
28
- pub const LOCAL_CRATE : CrateNum = CrateNum :: Index ( CrateId :: from_u32_const ( 0 ) ) ;
28
+ pub const LOCAL_CRATE : CrateNum = CrateNum :: Index ( CrateId :: from_u32 ( 0 ) ) ;
29
29
30
30
impl Idx for CrateNum {
31
31
#[ inline]
Original file line number Diff line number Diff line change @@ -997,7 +997,7 @@ rustc_index::newtype_index! {
997
997
998
998
impl Symbol {
999
999
const fn new ( n : u32 ) -> Self {
1000
- Symbol ( SymbolIndex :: from_u32_const ( n) )
1000
+ Symbol ( SymbolIndex :: from_u32 ( n) )
1001
1001
}
1002
1002
1003
1003
/// Maps a string to its interned representation.
You can’t perform that action at this time.
0 commit comments