Skip to content
Merged
19 changes: 6 additions & 13 deletions src/etc/natvis/libcore.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -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>
<Type Name="core::ptr::non_null::NonNull&lt;*&gt;">
<DisplayString>NonNull({(void*) pointer}: {pointer})</DisplayString>
<Expand>
<Item Name="[ptr]">pointer</Item>
<ExpandedItem>pointer</ExpandedItem>
</Expand>
</Type>

<Type Name="core::ptr::non_null::NonNull&lt;*&gt;">
<DisplayString>{(void*) pointer}</DisplayString>
<Type Name="core::ptr::unique::Unique&lt;*&gt;">
<DisplayString>Unique({(void*)pointer}: {pointer})</DisplayString>
<Expand>
<Item Name="[value]">*pointer</Item>
<ExpandedItem>pointer</ExpandedItem>
</Expand>
</Type>

Expand Down
21 changes: 21 additions & 0 deletions src/test/debuginfo/marker-types.rs
Original file line number Diff line number Diff line change
@@ -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() { }