@@ -393,12 +393,12 @@ pub fn get_trait_def<'tcx>(cdata: Cmd,
393
393
pub fn get_adt_def < ' tcx > ( intr : & IdentInterner ,
394
394
cdata : Cmd ,
395
395
item_id : ast:: NodeId ,
396
- tcx : & ty:: ctxt < ' tcx > ) -> & ' tcx ty:: ADTDef_ < ' tcx , ' tcx >
396
+ tcx : & ty:: ctxt < ' tcx > ) -> ty:: AdtDefMaster < ' tcx >
397
397
{
398
398
fn get_enum_variants < ' tcx > ( intr : & IdentInterner ,
399
399
cdata : Cmd ,
400
400
doc : rbml:: Doc ,
401
- tcx : & ty:: ctxt < ' tcx > ) -> Vec < ty:: VariantDef_ < ' tcx , ' tcx > > {
401
+ tcx : & ty:: ctxt < ' tcx > ) -> Vec < ty:: VariantDefData < ' tcx , ' tcx > > {
402
402
let mut disr_val = 0 ;
403
403
reader:: tagged_docs ( doc, tag_items_data_item_variant) . map ( |p| {
404
404
let did = translated_def_id ( cdata, p) ;
@@ -410,7 +410,7 @@ pub fn get_adt_def<'tcx>(intr: &IdentInterner,
410
410
let disr = disr_val;
411
411
disr_val = disr_val. wrapping_add ( 1 ) ;
412
412
413
- ty:: VariantDef_ {
413
+ ty:: VariantDefData {
414
414
did : did,
415
415
name : item_name ( intr, item) ,
416
416
fields : get_variant_fields ( intr, cdata, item, tcx) ,
@@ -421,29 +421,29 @@ pub fn get_adt_def<'tcx>(intr: &IdentInterner,
421
421
fn get_variant_fields < ' tcx > ( intr : & IdentInterner ,
422
422
cdata : Cmd ,
423
423
doc : rbml:: Doc ,
424
- tcx : & ty:: ctxt < ' tcx > ) -> Vec < ty:: FieldDef_ < ' tcx , ' tcx > > {
424
+ tcx : & ty:: ctxt < ' tcx > ) -> Vec < ty:: FieldDefData < ' tcx , ' tcx > > {
425
425
reader:: tagged_docs ( doc, tag_item_field) . map ( |f| {
426
426
let ff = item_family ( f) ;
427
427
match ff {
428
428
PublicField | InheritedField => { } ,
429
429
_ => tcx. sess . bug ( & format ! ( "expected field, found {:?}" , ff) )
430
430
} ;
431
- ty:: FieldDef_ :: new ( item_def_id ( f, cdata) ,
432
- item_name ( intr, f) ,
433
- struct_field_family_to_visibility ( ff) )
431
+ ty:: FieldDefData :: new ( item_def_id ( f, cdata) ,
432
+ item_name ( intr, f) ,
433
+ struct_field_family_to_visibility ( ff) )
434
434
} ) . chain ( reader:: tagged_docs ( doc, tag_item_unnamed_field) . map ( |f| {
435
435
let ff = item_family ( f) ;
436
- ty:: FieldDef_ :: new ( item_def_id ( f, cdata) ,
437
- special_idents:: unnamed_field. name ,
438
- struct_field_family_to_visibility ( ff) )
436
+ ty:: FieldDefData :: new ( item_def_id ( f, cdata) ,
437
+ special_idents:: unnamed_field. name ,
438
+ struct_field_family_to_visibility ( ff) )
439
439
} ) ) . collect ( )
440
440
}
441
441
fn get_struct_variant < ' tcx > ( intr : & IdentInterner ,
442
442
cdata : Cmd ,
443
443
doc : rbml:: Doc ,
444
444
did : ast:: DefId ,
445
- tcx : & ty:: ctxt < ' tcx > ) -> ty:: VariantDef_ < ' tcx , ' tcx > {
446
- ty:: VariantDef_ {
445
+ tcx : & ty:: ctxt < ' tcx > ) -> ty:: VariantDefData < ' tcx , ' tcx > {
446
+ ty:: VariantDefData {
447
447
did : did,
448
448
name : item_name ( intr, doc) ,
449
449
fields : get_variant_fields ( intr, cdata, doc, tcx) ,
@@ -454,9 +454,9 @@ pub fn get_adt_def<'tcx>(intr: &IdentInterner,
454
454
let doc = lookup_item ( item_id, cdata. data ( ) ) ;
455
455
let did = ast:: DefId { krate : cdata. cnum , node : item_id } ;
456
456
let ( kind, variants) = match item_family ( doc) {
457
- Enum => ( ty:: ADTKind :: Enum ,
457
+ Enum => ( ty:: AdtKind :: Enum ,
458
458
get_enum_variants ( intr, cdata, doc, tcx) ) ,
459
- Struct => ( ty:: ADTKind :: Struct ,
459
+ Struct => ( ty:: AdtKind :: Struct ,
460
460
vec ! [ get_struct_variant( intr, cdata, doc, did, tcx) ] ) ,
461
461
_ => tcx. sess . bug ( "get_adt_def called on a non-ADT" )
462
462
} ;
@@ -467,7 +467,7 @@ pub fn get_adt_def<'tcx>(intr: &IdentInterner,
467
467
// to support recursive structures
468
468
for variant in & adt. variants {
469
469
if variant. kind ( ) == ty:: VariantKind :: Tuple &&
470
- adt. adt_kind ( ) == ty:: ADTKind :: Enum {
470
+ adt. adt_kind ( ) == ty:: AdtKind :: Enum {
471
471
// tuple-like enum variant fields aren't real items - get the types
472
472
// from the ctor.
473
473
debug ! ( "evaluating the ctor-type of {:?}" ,
0 commit comments