diff options
| author | Wesley Wiser <wesleywiser@microsoft.com> | 2021-06-29 16:41:44 -0400 |
|---|---|---|
| committer | Wesley Wiser <wesleywiser@microsoft.com> | 2021-07-08 12:55:49 -0400 |
| commit | 8f1eec37545c276b0cfaa60d38b4778e1bba7214 (patch) | |
| tree | 2646619d637ee2eebae3bca2fcc88eb03ef9854a | |
| parent | cad42e0d330d8d3476f2217fe4f14f2f5e34e691 (diff) | |
| download | rust-8f1eec37545c276b0cfaa60d38b4778e1bba7214.tar.gz rust-8f1eec37545c276b0cfaa60d38b4778e1bba7214.zip | |
Fixup natvis for NonNull and Unique types
Remove the Shared type natvis since it no longer exists
| -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() { } |
