Show the variant name for univariant enums
Previously, only the fields would be displayed with no indication of the variant name. If you already knew the enum was univariant, this was ok but if the enum was univariant because of layout, for example, a `Result<T, !>` then it could be very confusing which variant was the active one.
This commit is contained in:
@@ -1517,7 +1517,7 @@ impl EnumMemberDescriptionFactory<'ll, 'tcx> {
|
||||
Some(&self.common_members),
|
||||
);
|
||||
vec![MemberDescription {
|
||||
name: if fallback { String::new() } else { variant_info.variant_name() },
|
||||
name: variant_info.variant_name(),
|
||||
type_metadata: variant_type_metadata,
|
||||
offset: Size::ZERO,
|
||||
size: self.layout.size,
|
||||
|
||||
Reference in New Issue
Block a user