@@ -641,7 +641,7 @@ pub fn type_metadata<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll
641641 AdtKind :: Struct => prepare_struct_metadata ( cx, t, unique_type_id) . finalize ( cx) ,
642642 AdtKind :: Union => prepare_union_metadata ( cx, t, unique_type_id) . finalize ( cx) ,
643643 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)
645645 }
646646 } ,
647647 ty:: Tuple ( tys) => {
@@ -1209,7 +1209,7 @@ fn prepare_struct_metadata<'ll, 'tcx>(
12091209 let struct_name = compute_debuginfo_type_name ( cx. tcx , struct_type, false ) ;
12101210
12111211 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 ( ) ) ,
12131213 _ => bug ! ( "prepare_struct_metadata on a non-ADT" ) ,
12141214 } ;
12151215
@@ -1386,7 +1386,7 @@ fn prepare_union_metadata<'ll, 'tcx>(
13861386 let union_name = compute_debuginfo_type_name ( cx. tcx , union_type, false ) ;
13871387
13881388 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 ( ) ) ,
13901390 _ => bug ! ( "prepare_union_metadata on a non-ADT" ) ,
13911391 } ;
13921392
@@ -1468,7 +1468,7 @@ impl<'ll, 'tcx> EnumMemberDescriptionFactory<'ll, 'tcx> {
14681468 } ;
14691469
14701470 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) ,
14721472 ty:: Generator ( def_id, _, _) => {
14731473 let ( generator_layout, generator_saved_local_names) =
14741474 generator_variant_info_data. as_ref ( ) . unwrap ( ) ;
@@ -1492,7 +1492,7 @@ impl<'ll, 'tcx> EnumMemberDescriptionFactory<'ll, 'tcx> {
14921492 match self . layout . variants {
14931493 Variants :: Single { index } => {
14941494 if let ty:: Adt ( adt, _) = self . enum_type . kind ( ) {
1495- if adt. variants . is_empty ( ) {
1495+ if adt. variants ( ) . is_empty ( ) {
14961496 return vec ! [ ] ;
14971497 }
14981498 }
@@ -1942,7 +1942,7 @@ fn prepare_enum_metadata<'ll, 'tcx>(
19421942
19431943 let discriminant_type_metadata = |discr : Primitive | {
19441944 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 ( ) )
19461946 . map ( |( ( _, discr) , v) | {
19471947 let name = v. name . as_str ( ) ;
19481948 let is_unsigned = match discr. ty . kind ( ) {
@@ -2313,7 +2313,7 @@ fn set_members_of_composite_type<'ll, 'tcx>(
23132313fn compute_type_parameters < ' ll , ' tcx > ( cx : & CodegenCx < ' ll , ' tcx > , ty : Ty < ' tcx > ) -> & ' ll DIArray {
23142314 if let ty:: Adt ( def, substs) = * ty. kind ( ) {
23152315 if substs. types ( ) . next ( ) . is_some ( ) {
2316- let generics = cx. tcx . generics_of ( def. did ) ;
2316+ let generics = cx. tcx . generics_of ( def. did ( ) ) ;
23172317 let names = get_parameter_names ( cx, generics) ;
23182318 let template_params: Vec < _ > = iter:: zip ( substs, names)
23192319 . filter_map ( |( kind, name) | {
0 commit comments