@@ -639,7 +639,7 @@ pub fn type_metadata<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) -> &'ll
639639 AdtKind :: Struct => prepare_struct_metadata ( cx, t, unique_type_id) . finalize ( cx) ,
640640 AdtKind :: Union => prepare_union_metadata ( cx, t, unique_type_id) . finalize ( cx) ,
641641 AdtKind :: Enum => {
642- prepare_enum_metadata ( cx, t, def. did , unique_type_id, vec ! [ ] ) . finalize ( cx)
642+ prepare_enum_metadata ( cx, t, def. did ( ) , unique_type_id, vec ! [ ] ) . finalize ( cx)
643643 }
644644 } ,
645645 ty:: Tuple ( tys) => {
@@ -1207,7 +1207,7 @@ fn prepare_struct_metadata<'ll, 'tcx>(
12071207 let struct_name = compute_debuginfo_type_name ( cx. tcx , struct_type, false ) ;
12081208
12091209 let ( struct_def_id, variant) = match struct_type. kind ( ) {
1210- ty:: Adt ( def, _) => ( def. did , def. non_enum_variant ( ) ) ,
1210+ ty:: Adt ( def, _) => ( def. did ( ) , def. non_enum_variant ( ) ) ,
12111211 _ => bug ! ( "prepare_struct_metadata on a non-ADT" ) ,
12121212 } ;
12131213
@@ -1384,7 +1384,7 @@ fn prepare_union_metadata<'ll, 'tcx>(
13841384 let union_name = compute_debuginfo_type_name ( cx. tcx , union_type, false ) ;
13851385
13861386 let ( union_def_id, variant) = match union_type. kind ( ) {
1387- ty:: Adt ( def, _) => ( def. did , def. non_enum_variant ( ) ) ,
1387+ ty:: Adt ( def, _) => ( def. did ( ) , def. non_enum_variant ( ) ) ,
13881388 _ => bug ! ( "prepare_union_metadata on a non-ADT" ) ,
13891389 } ;
13901390
@@ -1466,7 +1466,7 @@ impl<'ll, 'tcx> EnumMemberDescriptionFactory<'ll, 'tcx> {
14661466 } ;
14671467
14681468 let variant_info_for = |index : VariantIdx | match * self . enum_type . kind ( ) {
1469- ty:: Adt ( adt, _) => VariantInfo :: Adt ( & adt. variants [ index] , index) ,
1469+ ty:: Adt ( adt, _) => VariantInfo :: Adt ( & adt. variant ( index) , index) ,
14701470 ty:: Generator ( def_id, _, _) => {
14711471 let ( generator_layout, generator_saved_local_names) =
14721472 generator_variant_info_data. as_ref ( ) . unwrap ( ) ;
@@ -1490,7 +1490,7 @@ impl<'ll, 'tcx> EnumMemberDescriptionFactory<'ll, 'tcx> {
14901490 match self . layout . variants {
14911491 Variants :: Single { index } => {
14921492 if let ty:: Adt ( adt, _) = self . enum_type . kind ( ) {
1493- if adt. variants . is_empty ( ) {
1493+ if adt. variants ( ) . is_empty ( ) {
14941494 return vec ! [ ] ;
14951495 }
14961496 }
@@ -1940,7 +1940,7 @@ fn prepare_enum_metadata<'ll, 'tcx>(
19401940
19411941 let discriminant_type_metadata = |discr : Primitive | {
19421942 let enumerators_metadata: Vec < _ > = match enum_type. kind ( ) {
1943- ty:: Adt ( def, _) => iter:: zip ( def. discriminants ( tcx) , & def. variants )
1943+ ty:: Adt ( def, _) => iter:: zip ( def. discriminants ( tcx) , def. variants ( ) )
19441944 . map ( |( ( _, discr) , v) | {
19451945 let name = v. name . as_str ( ) ;
19461946 let is_unsigned = match discr. ty . kind ( ) {
@@ -2311,7 +2311,7 @@ fn set_members_of_composite_type<'ll, 'tcx>(
23112311fn compute_type_parameters < ' ll , ' tcx > ( cx : & CodegenCx < ' ll , ' tcx > , ty : Ty < ' tcx > ) -> & ' ll DIArray {
23122312 if let ty:: Adt ( def, substs) = * ty. kind ( ) {
23132313 if substs. types ( ) . next ( ) . is_some ( ) {
2314- let generics = cx. tcx . generics_of ( def. did ) ;
2314+ let generics = cx. tcx . generics_of ( def. did ( ) ) ;
23152315 let names = get_parameter_names ( cx, generics) ;
23162316 let template_params: Vec < _ > = iter:: zip ( substs, names)
23172317 . filter_map ( |( kind, name) | {
0 commit comments