Rollup merge of #155690 - fneddy:fix_classify_union, r=jieyouxu

Fix classify_union to return Union for regular unions

Commit 623c7d7c4b accidentally changed the return value from REGULAR_UNION to RegularEnum when converting string literals to enum values. Commit b17670d3de 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.
This commit is contained in:
Trevor Gross
2026-04-23 20:32:52 -04:00
committed by GitHub
+1 -1
View File
@@ -130,4 +130,4 @@ def classify_union(fields: List) -> RustType:
assert len(fields) == 1
return RustType.CompressedEnum
else:
return RustType.RegularEnum
return RustType.Union