@@ -2029,7 +2029,7 @@ impl<'tcx> StructMemberDescriptionFactory<'tcx> {
2029
2029
2030
2030
self . fields . iter ( ) . enumerate ( ) . map ( |( i, field) | {
2031
2031
let name = if field. name == special_idents:: unnamed_field. name {
2032
- "" . to_string ( )
2032
+ format ! ( "__{}" , i )
2033
2033
} else {
2034
2034
token:: get_name ( field. name ) . to_string ( )
2035
2035
} ;
@@ -2107,9 +2107,12 @@ struct TupleMemberDescriptionFactory<'tcx> {
2107
2107
impl < ' tcx > TupleMemberDescriptionFactory < ' tcx > {
2108
2108
fn create_member_descriptions < ' a > ( & self , cx : & CrateContext < ' a , ' tcx > )
2109
2109
-> Vec < MemberDescription > {
2110
- self . component_types . iter ( ) . map ( |& component_type| {
2110
+ self . component_types
2111
+ . iter ( )
2112
+ . enumerate ( )
2113
+ . map ( |( i, & component_type) | {
2111
2114
MemberDescription {
2112
- name : "" . to_string ( ) ,
2115
+ name : format ! ( "__{}" , i ) ,
2113
2116
llvm_type : type_of:: type_of ( cx, component_type) ,
2114
2117
type_metadata : type_metadata ( cx, component_type, self . span ) ,
2115
2118
offset : ComputedMemberOffset ,
@@ -2262,7 +2265,7 @@ impl<'tcx> EnumMemberDescriptionFactory<'tcx> {
2262
2265
let sole_struct_member_description = MemberDescription {
2263
2266
name : match non_null_variant. arg_names {
2264
2267
Some ( ref names) => token:: get_name ( names[ 0 ] ) . to_string ( ) ,
2265
- None => "" . to_string ( )
2268
+ None => "__0 " . to_string ( )
2266
2269
} ,
2267
2270
llvm_type : non_null_llvm_type,
2268
2271
type_metadata : non_null_type_metadata,
@@ -2432,7 +2435,13 @@ fn describe_enum_variant<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
2432
2435
. map ( |& name| token:: get_name ( name) . to_string ( ) )
2433
2436
. collect ( )
2434
2437
}
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
+ }
2436
2445
} ;
2437
2446
2438
2447
// If this is not a univariant enum, there is also the discriminant field.
0 commit comments