Skip to content

Commit

Permalink
Auto merge of rust-lang#93626 - wesleywiser:fix_hashmap_natvis, r=mic…
Browse files Browse the repository at this point in the history
…haelwoerister

Fix HashMap not displaying correctly in VS debugger

The natvis to render HashMaps was not working correctly in Visual Studio
because the type names for tuples changed from `tuple$<A, B>` to
`tuple$<A,B>` (notice the missing space). WinDbg and cdb continued to
parse this type name which is why no tests in CI broke. VS however is
slightly more strict and this caused the visualizer to break.

Since we cannot test the VS debugger in CI, I'm not checking in any
test changes.

Fixes rust-lang#92286

r? `@michaelwoerister`
  • Loading branch information
bors committed Feb 8, 2022
2 parents 03b17b1 + fa99aaa commit 775e480
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/etc/natvis/libstd.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<If Condition="(base.table.table.ctrl.pointer[i] &amp; 0x80) == 0">
<!-- Bucket is populated -->
<Exec>n--</Exec>
<Item Name="{((tuple$&lt;$T1, $T2&gt;*)base.table.table.ctrl.pointer)[-(i + 1)].__0}">((tuple$&lt;$T1, $T2&gt;*)base.table.table.ctrl.pointer)[-(i + 1)].__1</Item>
<Item Name="{((tuple$&lt;$T1,$T2&gt;*)base.table.table.ctrl.pointer)[-(i + 1)].__0}">((tuple$&lt;$T1,$T2&gt;*)base.table.table.ctrl.pointer)[-(i + 1)].__1</Item>
</If>
<Exec>i++</Exec>
</Loop>
Expand Down

0 comments on commit 775e480

Please sign in to comment.