Skip to content

Commit 8f1eec3

Browse files
committed
Fixup natvis for NonNull and Unique types
Remove the Shared type natvis since it no longer exists
1 parent cad42e0 commit 8f1eec3

File tree

2 files changed

+27
-13
lines changed

2 files changed

+27
-13
lines changed

src/etc/natvis/libcore.natvis

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,24 +75,17 @@
7575
<DisplayString>{__0}</DisplayString>
7676
</Type>
7777

78-
<Type Name="core::ptr::Unique&lt;*&gt;">
79-
<DisplayString>{{ Unique {pointer} }}</DisplayString>
80-
<Expand>
81-
<Item Name="[ptr]">pointer</Item>
82-
</Expand>
83-
</Type>
84-
85-
<Type Name="core::ptr::Shared&lt;*&gt;">
86-
<DisplayString>{{ Shared {pointer} }}</DisplayString>
78+
<Type Name="core::ptr::non_null::NonNull&lt;*&gt;">
79+
<DisplayString>NonNull({(void*) pointer}: {pointer})</DisplayString>
8780
<Expand>
88-
<Item Name="[ptr]">pointer</Item>
81+
<ExpandedItem>pointer</ExpandedItem>
8982
</Expand>
9083
</Type>
9184

92-
<Type Name="core::ptr::non_null::NonNull&lt;*&gt;">
93-
<DisplayString>{(void*) pointer}</DisplayString>
85+
<Type Name="core::ptr::unique::Unique&lt;*&gt;">
86+
<DisplayString>Unique({(void*)pointer}: {pointer})</DisplayString>
9487
<Expand>
95-
<Item Name="[value]">*pointer</Item>
88+
<ExpandedItem>pointer</ExpandedItem>
9689
</Expand>
9790
</Type>
9891

src/test/debuginfo/marker-types.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// only-cdb
2+
// compile-flags:-g
3+
4+
// === CDB TESTS ==================================================================================
5+
6+
// cdb-command: g
7+
8+
// cdb-command: dx nonnull
9+
// cdb-check:nonnull : NonNull(0x[...]: 0xc) [Type: core::ptr::non_null::NonNull<u32>]
10+
// cdb-check: [<Raw View>] [Type: core::ptr::non_null::NonNull<u32>]
11+
// cdb-checK: 0xc [Type: unsigned int]
12+
13+
use std::ptr::NonNull;
14+
15+
fn main() {
16+
let nonnull: NonNull<_> = (&12u32).into();
17+
18+
zzz(); // #break
19+
}
20+
21+
fn zzz() { }

0 commit comments

Comments
 (0)