diff options
| author | MaulingMonkey <git@maulingmonkey.com> | 2020-09-05 14:50:03 -0700 |
|---|---|---|
| committer | MaulingMonkey <git@maulingmonkey.com> | 2020-09-05 14:50:03 -0700 |
| commit | 5acd272f5f7d892b73cfbe90bdf266af10ea30ce (patch) | |
| tree | f1bfc7d4db0b49c8c8ef47f3fa692b7bbeeec569 | |
| parent | 81a769f261047afd8e31cc488b173b0ab5ac4205 (diff) | |
| download | rust-5acd272f5f7d892b73cfbe90bdf266af10ea30ce.tar.gz rust-5acd272f5f7d892b73cfbe90bdf266af10ea30ce.zip | |
Fix HashMap visualizers in Visual Studio (Code)
CDB doesn't care that you're using static_cast between unrelated types. VS(C) does. These should've been reinterpret_cast or C casts. Cast is from e.g. `u8*` to `tuple<$T1, $T2>*`
| -rw-r--r-- | src/etc/natvis/libstd.natvis | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/etc/natvis/libstd.natvis b/src/etc/natvis/libstd.natvis index 4e81173d3d0..f791979800f 100644 --- a/src/etc/natvis/libstd.natvis +++ b/src/etc/natvis/libstd.natvis @@ -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> |
