@@ -2029,7 +2029,7 @@ impl<'tcx> StructMemberDescriptionFactory<'tcx> {
20292029
20302030 self . fields . iter ( ) . enumerate ( ) . map ( |( i, field) | {
20312031 let name = if field. name == special_idents:: unnamed_field. name {
2032- "" . to_string ( )
2032+ format ! ( "__{}" , i )
20332033 } else {
20342034 token:: get_name ( field. name ) . to_string ( )
20352035 } ;
@@ -2107,9 +2107,12 @@ struct TupleMemberDescriptionFactory<'tcx> {
21072107impl < ' tcx > TupleMemberDescriptionFactory < ' tcx > {
21082108 fn create_member_descriptions < ' a > ( & self , cx : & CrateContext < ' a , ' tcx > )
21092109 -> Vec < MemberDescription > {
2110- self . component_types . iter ( ) . map ( |& component_type| {
2110+ self . component_types
2111+ . iter ( )
2112+ . enumerate ( )
2113+ . map ( |( i, & component_type) | {
21112114 MemberDescription {
2112- name : "" . to_string ( ) ,
2115+ name : format ! ( "__{}" , i ) ,
21132116 llvm_type : type_of:: type_of ( cx, component_type) ,
21142117 type_metadata : type_metadata ( cx, component_type, self . span ) ,
21152118 offset : ComputedMemberOffset ,
@@ -2262,7 +2265,7 @@ impl<'tcx> EnumMemberDescriptionFactory<'tcx> {
22622265 let sole_struct_member_description = MemberDescription {
22632266 name : match non_null_variant. arg_names {
22642267 Some ( ref names) => token:: get_name ( names[ 0 ] ) . to_string ( ) ,
2265- None => "" . to_string ( )
2268+ None => "__0 " . to_string ( )
22662269 } ,
22672270 llvm_type : non_null_llvm_type,
22682271 type_metadata : non_null_type_metadata,
@@ -2432,7 +2435,13 @@ fn describe_enum_variant<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
24322435 . map ( |& name| token:: get_name ( name) . to_string ( ) )
24332436 . collect ( )
24342437 }
2435- None => variant_info. args . iter ( ) . map ( |_| "" . to_string ( ) ) . collect ( )
2438+ None => {
2439+ variant_info. args
2440+ . iter ( )
2441+ . enumerate ( )
2442+ . map ( |( i, _) | format ! ( "__{}" , i) )
2443+ . collect ( )
2444+ }
24362445 } ;
24372446
24382447 // If this is not a univariant enum, there is also the discriminant field.
0 commit comments