Skip to content

Commit e16f20b

Browse files
Rollup merge of #155690 - fneddy:fix_classify_union, r=jieyouxu
Fix classify_union to return Union for regular unions Commit 623c7d7 accidentally changed the return value from REGULAR_UNION to RegularEnum when converting string literals to enum values. Commit b17670d then renamed RegularUnion to Union, but the buggy return statement remained unchanged. This caused unions to be misclassified as enums, preventing LLDB from displaying union field contents.
2 parents 09999c7 + 2f99ab1 commit e16f20b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/etc/rust_types.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,4 @@ def classify_union(fields: List) -> RustType:
130130
assert len(fields) == 1
131131
return RustType.CompressedEnum
132132
else:
133-
return RustType.RegularEnum
133+
return RustType.Union

0 commit comments

Comments
 (0)