Fixup natvis for NonNull and Unique types

Remove the Shared type natvis since it no longer exists
This commit is contained in:
Wesley Wiser 2021-06-29 16:41:44 -04:00
parent cad42e0d33
commit 8f1eec3754
2 changed files with 30 additions and 16 deletions

View File

@ -75,24 +75,17 @@
<DisplayString>{__0}</DisplayString>
</Type>
<Type Name="core::ptr::Unique&lt;*&gt;">
<DisplayString>{{ Unique {pointer} }}</DisplayString>
<Expand>
<Item Name="[ptr]">pointer</Item>
</Expand>
</Type>
<Type Name="core::ptr::Shared&lt;*&gt;">
<DisplayString>{{ Shared {pointer} }}</DisplayString>
<Expand>
<Item Name="[ptr]">pointer</Item>
</Expand>
</Type>
<Type Name="core::ptr::non_null::NonNull&lt;*&gt;">
<DisplayString>{(void*) pointer}</DisplayString>
<DisplayString>NonNull({(void*) pointer}: {pointer})</DisplayString>
<Expand>
<Item Name="[value]">*pointer</Item>
<ExpandedItem>pointer</ExpandedItem>
</Expand>
</Type>
<Type Name="core::ptr::unique::Unique&lt;*&gt;">
<DisplayString>Unique({(void*)pointer}: {pointer})</DisplayString>
<Expand>
<ExpandedItem>pointer</ExpandedItem>
</Expand>
</Type>

View File

@ -0,0 +1,21 @@
// only-cdb
// compile-flags:-g
// === CDB TESTS ==================================================================================
// cdb-command: g
// cdb-command: dx nonnull
// cdb-check:nonnull : NonNull(0x[...]: 0xc) [Type: core::ptr::non_null::NonNull<u32>]
// cdb-check: [<Raw View>] [Type: core::ptr::non_null::NonNull<u32>]
// cdb-checK: 0xc [Type: unsigned int]
use std::ptr::NonNull;
fn main() {
let nonnull: NonNull<_> = (&12u32).into();
zzz(); // #break
}
fn zzz() { }