@@ -326,7 +326,7 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
326326 coroutine_type_and_layout : TyAndLayout < ' tcx > ,
327327 coroutine_type_di_node : & ' ll DIType ,
328328 coroutine_layout : & CoroutineLayout < ' tcx > ,
329- common_upvar_names : & IndexSlice < FieldIdx , Symbol > ,
329+ _common_upvar_names : & IndexSlice < FieldIdx , Symbol > ,
330330) -> & ' ll DIType {
331331 let variant_name = CoroutineArgs :: variant_name ( variant_index) ;
332332 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>(
337337
338338 let variant_layout = coroutine_type_and_layout. for_variant ( cx, variant_index) ;
339339
340- let coroutine_args = match coroutine_type_and_layout. ty . kind ( ) {
340+ let _coroutine_args = match coroutine_type_and_layout. ty . kind ( ) {
341341 ty:: Coroutine ( _, args) => args. as_coroutine ( ) ,
342342 _ => unreachable ! ( ) ,
343343 } ;
@@ -355,7 +355,7 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
355355 ) ,
356356 |cx, variant_struct_type_di_node| {
357357 // Fields that just belong to this variant/state
358- let state_specific_fields : SmallVec < _ > = ( 0 ..variant_layout. fields . count ( ) )
358+ ( 0 ..variant_layout. fields . count ( ) )
359359 . map ( |field_index| {
360360 let coroutine_saved_local = coroutine_layout. variant_fields [ variant_index]
361361 [ FieldIdx :: from_usize ( field_index) ] ;
@@ -377,28 +377,7 @@ pub fn build_coroutine_variant_struct_type_di_node<'ll, 'tcx>(
377377 type_di_node ( cx, field_type) ,
378378 )
379379 } )
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 ( )
380+ . collect ( )
402381 } ,
403382 |cx| build_generic_type_param_di_nodes ( cx, coroutine_type_and_layout. ty ) ,
404383 )
0 commit comments