@@ -641,7 +641,7 @@ pub fn type_metadata<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll
641
641
AdtKind :: Struct => prepare_struct_metadata ( cx, t, unique_type_id) . finalize ( cx) ,
642
642
AdtKind :: Union => prepare_union_metadata ( cx, t, unique_type_id) . finalize ( cx) ,
643
643
AdtKind :: Enum => {
644
- prepare_enum_metadata ( cx, t, def. did , unique_type_id, vec ! [ ] ) . finalize ( cx)
644
+ prepare_enum_metadata ( cx, t, def. did ( ) , unique_type_id, vec ! [ ] ) . finalize ( cx)
645
645
}
646
646
} ,
647
647
ty:: Tuple ( tys) => {
@@ -1209,7 +1209,7 @@ fn prepare_struct_metadata<'ll, 'tcx>(
1209
1209
let struct_name = compute_debuginfo_type_name ( cx. tcx , struct_type, false ) ;
1210
1210
1211
1211
let ( struct_def_id, variant) = match struct_type. kind ( ) {
1212
- ty:: Adt ( def, _) => ( def. did , def. non_enum_variant ( ) ) ,
1212
+ ty:: Adt ( def, _) => ( def. did ( ) , def. non_enum_variant ( ) ) ,
1213
1213
_ => bug ! ( "prepare_struct_metadata on a non-ADT" ) ,
1214
1214
} ;
1215
1215
@@ -1386,7 +1386,7 @@ fn prepare_union_metadata<'ll, 'tcx>(
1386
1386
let union_name = compute_debuginfo_type_name ( cx. tcx , union_type, false ) ;
1387
1387
1388
1388
let ( union_def_id, variant) = match union_type. kind ( ) {
1389
- ty:: Adt ( def, _) => ( def. did , def. non_enum_variant ( ) ) ,
1389
+ ty:: Adt ( def, _) => ( def. did ( ) , def. non_enum_variant ( ) ) ,
1390
1390
_ => bug ! ( "prepare_union_metadata on a non-ADT" ) ,
1391
1391
} ;
1392
1392
@@ -1468,7 +1468,7 @@ impl<'ll, 'tcx> EnumMemberDescriptionFactory<'ll, 'tcx> {
1468
1468
} ;
1469
1469
1470
1470
let variant_info_for = |index : VariantIdx | match * self . enum_type . kind ( ) {
1471
- ty:: Adt ( adt, _) => VariantInfo :: Adt ( & adt. variants [ index] , index) ,
1471
+ ty:: Adt ( adt, _) => VariantInfo :: Adt ( & adt. variant ( index) , index) ,
1472
1472
ty:: Generator ( def_id, _, _) => {
1473
1473
let ( generator_layout, generator_saved_local_names) =
1474
1474
generator_variant_info_data. as_ref ( ) . unwrap ( ) ;
@@ -1492,7 +1492,7 @@ impl<'ll, 'tcx> EnumMemberDescriptionFactory<'ll, 'tcx> {
1492
1492
match self . layout . variants {
1493
1493
Variants :: Single { index } => {
1494
1494
if let ty:: Adt ( adt, _) = self . enum_type . kind ( ) {
1495
- if adt. variants . is_empty ( ) {
1495
+ if adt. variants ( ) . is_empty ( ) {
1496
1496
return vec ! [ ] ;
1497
1497
}
1498
1498
}
@@ -1942,7 +1942,7 @@ fn prepare_enum_metadata<'ll, 'tcx>(
1942
1942
1943
1943
let discriminant_type_metadata = |discr : Primitive | {
1944
1944
let enumerators_metadata: Vec < _ > = match enum_type. kind ( ) {
1945
- ty:: Adt ( def, _) => iter:: zip ( def. discriminants ( tcx) , & def. variants )
1945
+ ty:: Adt ( def, _) => iter:: zip ( def. discriminants ( tcx) , def. variants ( ) )
1946
1946
. map ( |( ( _, discr) , v) | {
1947
1947
let name = v. name . as_str ( ) ;
1948
1948
let is_unsigned = match discr. ty . kind ( ) {
@@ -2313,7 +2313,7 @@ fn set_members_of_composite_type<'ll, 'tcx>(
2313
2313
fn compute_type_parameters < ' ll , ' tcx > ( cx : & CodegenCx < ' ll , ' tcx > , ty : Ty < ' tcx > ) -> & ' ll DIArray {
2314
2314
if let ty:: Adt ( def, substs) = * ty. kind ( ) {
2315
2315
if substs. types ( ) . next ( ) . is_some ( ) {
2316
- let generics = cx. tcx . generics_of ( def. did ) ;
2316
+ let generics = cx. tcx . generics_of ( def. did ( ) ) ;
2317
2317
let names = get_parameter_names ( cx, generics) ;
2318
2318
let template_params: Vec < _ > = iter:: zip ( substs, names)
2319
2319
. filter_map ( |( kind, name) | {
0 commit comments