]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #86636 - wesleywiser:misc_enum_improvements, r=michaelwoerister
authorbors <bors@rust-lang.org>
Tue, 6 Jul 2021 19:31:24 +0000 (19:31 +0000)
committerbors <bors@rust-lang.org>
Tue, 6 Jul 2021 19:31:24 +0000 (19:31 +0000)
commit885399992c4c1dde37b506b8507a7d69415646b9
tree5deed964fe74eee58a066e286008dbdb1bed8743
parent238fd72880776c5dbd3b067acb096562e6af5399
parent457165e1ed283a1c86db55ab926bc2166c4a8ee9
Auto merge of #86636 - wesleywiser:misc_enum_improvements, r=michaelwoerister

[msvc] Consistently show active variant and fix visualization for single variant enums

Prior to this change, there were a few cases where inspecting an enum in either WinDbg or Visual Studio would not show the active variant name. After these changes, we now consistently show the active variant name as `[variant]` in the debugger.

We also didn't handle single variant enums very well. That is now also resolved.

Before:
![image](https://user-images.githubusercontent.com/831192/123480097-dc8b5f00-d5cf-11eb-93a8-9fc05a97029b.png)

After:
![image](https://user-images.githubusercontent.com/831192/123479966-aa79fd00-d5cf-11eb-955e-9798616a8829.png)

r? `@michaelwoerister`