diff options
| -rw-r--r-- | src/etc/natvis/libcore.natvis | 19 | ||||
| -rw-r--r-- | src/test/debuginfo/marker-types.rs | 21 |
2 files changed, 27 insertions, 13 deletions
diff --git a/src/etc/natvis/libcore.natvis b/src/etc/natvis/libcore.natvis index 96459adb6b8..04e72c706b4 100644 --- a/src/etc/natvis/libcore.natvis +++ b/src/etc/natvis/libcore.natvis @@ -75,24 +75,17 @@ <DisplayString>{__0}</DisplayString> </Type> - <Type Name="core::ptr::Unique<*>"> - <DisplayString>{{ Unique {pointer} }}</DisplayString> - <Expand> - <Item Name="[ptr]">pointer</Item> - </Expand> - </Type> - - <Type Name="core::ptr::Shared<*>"> - <DisplayString>{{ Shared {pointer} }}</DisplayString> + <Type Name="core::ptr::non_null::NonNull<*>"> + <DisplayString>NonNull({(void*) pointer}: {pointer})</DisplayString> <Expand> - <Item Name="[ptr]">pointer</Item> + <ExpandedItem>pointer</ExpandedItem> </Expand> </Type> - <Type Name="core::ptr::non_null::NonNull<*>"> - <DisplayString>{(void*) pointer}</DisplayString> + <Type Name="core::ptr::unique::Unique<*>"> + <DisplayString>Unique({(void*)pointer}: {pointer})</DisplayString> <Expand> - <Item Name="[value]">*pointer</Item> + <ExpandedItem>pointer</ExpandedItem> </Expand> </Type> diff --git a/src/test/debuginfo/marker-types.rs b/src/test/debuginfo/marker-types.rs new file mode 100644 index 00000000000..43e45d8f282 --- /dev/null +++ b/src/test/debuginfo/marker-types.rs @@ -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() { } |
