@@ -58,7 +58,6 @@ use rustc_errors::{DiagnosticArgFromDisplay, StashKey};
58
58
use rustc_hir as hir;
59
59
use rustc_hir:: def:: { DefKind , LifetimeRes , Namespace , PartialRes , PerNS , Res } ;
60
60
use rustc_hir:: def_id:: { LocalDefId , CRATE_DEF_ID , LOCAL_CRATE } ;
61
- use rustc_hir:: definitions:: DefPathData ;
62
61
use rustc_hir:: { ConstArg , GenericArg , ItemLocalId , ParamName , TraitCandidate } ;
63
62
use rustc_index:: { Idx , IndexSlice , IndexVec } ;
64
63
use rustc_middle:: {
@@ -499,20 +498,20 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
499
498
& mut self ,
500
499
parent : LocalDefId ,
501
500
node_id : ast:: NodeId ,
502
- data : DefPathData ,
501
+ name : Symbol ,
503
502
def_kind : DefKind ,
504
503
span : Span ,
505
504
) -> LocalDefId {
506
505
debug_assert_ne ! ( node_id, ast:: DUMMY_NODE_ID ) ;
507
506
assert ! (
508
507
self . opt_local_def_id( node_id) . is_none( ) ,
509
- "adding a def'n for node-id {:?} and data {:?} but a previous def'n exists: {:?}" ,
508
+ "adding a def'n for node-id {:?} and def kind {:?} but a previous def'n exists: {:?}" ,
510
509
node_id,
511
- data ,
510
+ def_kind ,
512
511
self . tcx. hir( ) . def_key( self . local_def_id( node_id) ) ,
513
512
) ;
514
513
515
- let def_id = self . tcx . at ( span) . create_def ( parent, data , def_kind) . def_id ( ) ;
514
+ let def_id = self . tcx . at ( span) . create_def ( parent, name , def_kind) . def_id ( ) ;
516
515
517
516
debug ! ( "create_def: def_id_to_node_id[{:?}] <-> {:?}" , def_id, node_id) ;
518
517
self . resolver . node_id_to_def_id . insert ( node_id, def_id) ;
@@ -809,7 +808,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
809
808
let _def_id = self . create_def (
810
809
self . current_hir_id_owner . def_id ,
811
810
param,
812
- DefPathData :: LifetimeNs ( kw:: UnderscoreLifetime ) ,
811
+ kw:: UnderscoreLifetime ,
813
812
DefKind :: LifetimeParam ,
814
813
ident. span ,
815
814
) ;
@@ -1227,7 +1226,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1227
1226
let def_id = self . create_def (
1228
1227
parent_def_id. def_id ,
1229
1228
node_id,
1230
- DefPathData :: AnonConst ,
1229
+ kw :: Empty ,
1231
1230
DefKind :: AnonConst ,
1232
1231
span,
1233
1232
) ;
@@ -1465,7 +1464,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1465
1464
self . create_def (
1466
1465
self . current_hir_id_owner . def_id ,
1467
1466
* def_node_id,
1468
- DefPathData :: TypeNs ( ident. name ) ,
1467
+ ident. name ,
1469
1468
DefKind :: TyParam ,
1470
1469
span,
1471
1470
) ;
@@ -1619,7 +1618,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1619
1618
let opaque_ty_def_id = self . create_def (
1620
1619
self . current_hir_id_owner . def_id ,
1621
1620
opaque_ty_node_id,
1622
- DefPathData :: ImplTrait ,
1621
+ kw :: Empty ,
1623
1622
DefKind :: OpaqueTy ,
1624
1623
opaque_ty_span,
1625
1624
) ;
@@ -1674,7 +1673,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
1674
1673
let duplicated_lifetime_def_id = self . create_def (
1675
1674
opaque_ty_def_id,
1676
1675
duplicated_lifetime_node_id,
1677
- DefPathData :: LifetimeNs ( lifetime. ident . name ) ,
1676
+ lifetime. ident . name ,
1678
1677
DefKind :: LifetimeParam ,
1679
1678
lifetime. ident . span ,
1680
1679
) ;
@@ -2549,7 +2548,7 @@ impl<'hir> GenericArgsCtor<'hir> {
2549
2548
let def_id = lcx. create_def (
2550
2549
lcx. current_hir_id_owner . def_id ,
2551
2550
id,
2552
- DefPathData :: AnonConst ,
2551
+ kw :: Empty ,
2553
2552
DefKind :: AnonConst ,
2554
2553
span,
2555
2554
) ;
0 commit comments