Rollup merge of #76389 - MaulingMonkey:pr-natvis-hashmap-vsc, r=petrochenkov
Fix HashMap visualizers in Visual Studio (Code) CDB (as used in unit tests) doesn't care that we're using static_cast between unrelated types (`u8*` to `tuple<$T1, $T2>*`). Visual Studio & Visual Studio Code care. These should've been reinterpret_cast or C casts. Credit to @petrochenkov per https://github.com/rust-lang/rust/issues/76352 for helping catch this. ### Testing ```cmd x.py test --stage 1 src/tools/tidy x.py test --stage 1 --build x86_64-pc-windows-msvc src\test\debuginfo ```
This commit is contained in:
commit
222b88501d
@ -41,7 +41,7 @@
|
||||
<If Condition="(base.table.ctrl.pointer[i] & 0x80) == 0">
|
||||
<!-- Bucket is populated -->
|
||||
<Exec>n--</Exec>
|
||||
<Item Name="{static_cast<tuple<$T1, $T2>*>(base.table.ctrl.pointer)[-(i + 1)].__0}">static_cast<tuple<$T1, $T2>*>(base.table.ctrl.pointer)[-(i + 1)].__1</Item>
|
||||
<Item Name="{((tuple<$T1, $T2>*)base.table.ctrl.pointer)[-(i + 1)].__0}">((tuple<$T1, $T2>*)base.table.ctrl.pointer)[-(i + 1)].__1</Item>
|
||||
</If>
|
||||
<Exec>i++</Exec>
|
||||
</Loop>
|
||||
@ -65,7 +65,7 @@
|
||||
<If Condition="(map.base.table.ctrl.pointer[i] & 0x80) == 0">
|
||||
<!-- Bucket is populated -->
|
||||
<Exec>n--</Exec>
|
||||
<Item>static_cast<$T1*>(map.base.table.ctrl.pointer)[-(i + 1)]</Item>
|
||||
<Item>(($T1*)map.base.table.ctrl.pointer)[-(i + 1)]</Item>
|
||||
</If>
|
||||
<Exec>i++</Exec>
|
||||
</Loop>
|
||||
|
Loading…
Reference in New Issue
Block a user