@@ -326,7 +326,7 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
326
326
coroutine_type_and_layout : TyAndLayout < ' tcx > ,
327
327
coroutine_type_di_node : & ' ll DIType ,
328
328
coroutine_layout : & CoroutineLayout < ' tcx > ,
329
- common_upvar_names : & IndexSlice < FieldIdx , Symbol > ,
329
+ _common_upvar_names : & IndexSlice < FieldIdx , Symbol > ,
330
330
) -> & ' ll DIType {
331
331
let variant_name = CoroutineArgs :: variant_name ( variant_index) ;
332
332
let unique_type_id = UniqueTypeId :: for_enum_variant_struct_type (
@@ -337,7 +337,7 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
337
337
338
338
let variant_layout = coroutine_type_and_layout. for_variant ( cx, variant_index) ;
339
339
340
- let coroutine_args = match coroutine_type_and_layout. ty . kind ( ) {
340
+ let _coroutine_args = match coroutine_type_and_layout. ty . kind ( ) {
341
341
ty:: Coroutine ( _, args) => args. as_coroutine ( ) ,
342
342
_ => unreachable ! ( ) ,
343
343
} ;
@@ -355,7 +355,7 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
355
355
) ,
356
356
|cx, variant_struct_type_di_node| {
357
357
// Fields that just belong to this variant/state
358
- let state_specific_fields : SmallVec < _ > = ( 0 ..variant_layout. fields . count ( ) )
358
+ let state_specific_args : SmallVec < _ > = ( 0 ..variant_layout. fields . count ( ) )
359
359
. map ( |field_index| {
360
360
let coroutine_saved_local = coroutine_layout. variant_fields [ variant_index]
361
361
[ FieldIdx :: from_usize ( field_index) ] ;
@@ -378,27 +378,22 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
378
378
)
379
379
} )
380
380
. collect ( ) ;
381
-
382
- // Fields that are common to all states
383
- let common_fields: SmallVec < _ > = coroutine_args
384
- . prefix_tys ( )
385
- . iter ( )
386
- . zip ( common_upvar_names)
387
- . enumerate ( )
388
- . map ( |( index, ( upvar_ty, upvar_name) ) | {
389
- build_field_di_node (
390
- cx,
391
- variant_struct_type_di_node,
392
- upvar_name. as_str ( ) ,
393
- cx. size_and_align_of ( upvar_ty) ,
394
- coroutine_type_and_layout. fields . offset ( index) ,
395
- DIFlags :: FlagZero ,
396
- type_di_node ( cx, upvar_ty) ,
397
- )
398
- } )
399
- . collect ( ) ;
400
-
401
- state_specific_fields. into_iter ( ) . chain ( common_fields) . collect ( )
381
+ // state_specific_args.extend(
382
+ // coroutine_args.upvar_tys().iter().zip(common_upvar_names).enumerate().map(
383
+ // |(index, (upvar_ty, upvar_name))| {
384
+ // build_field_di_node(
385
+ // cx,
386
+ // variant_struct_type_di_node,
387
+ // upvar_name.as_str(),
388
+ // cx.size_and_align_of(upvar_ty),
389
+ // coroutine_type_and_layout.fields.offset(index),
390
+ // DIFlags::FlagZero,
391
+ // type_di_node(cx, upvar_ty),
392
+ // )
393
+ // },
394
+ // ),
395
+ // );
396
+ state_specific_args
402
397
} ,
403
398
|cx| build_generic_type_param_di_nodes ( cx, coroutine_type_and_layout. ty ) ,
404
399
)
0 commit comments