mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
Fix classify_union to return Union for regular unions
Commit623c7d7c4baccidentally changed the return value from REGULAR_UNION to RegularEnum when converting string literals to enum values. Commitb17670d3dethen 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:
@@ -130,4 +130,4 @@ def classify_union(fields: List) -> RustType:
|
||||
assert len(fields) == 1
|
||||
return RustType.CompressedEnum
|
||||
else:
|
||||
return RustType.RegularEnum
|
||||
return RustType.Union
|
||||
|
||||
Reference in New Issue
Block a user