Skip to content

Commit 7c55b48

Browse files
committed
Fix .natvis visualizers.
Updated to handle these changes: - `core::ptr::*` lost their `__0` elements and are just plain pointers - `core::ptr::*` probably shouldn't dereference in `DisplayString` s - `VecDeque` and `Vec` use `core::ptr::*` s - `VecDeque` and `LinkedList` moved modules again. Retested - still working fine, left alone: - `String`, `&str`, `Option`
1 parent a784a80 commit 7c55b48

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/etc/natvis/liballoc.natvis

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<Item Name="[capacity]" ExcludeView="simple">buf.cap</Item>
88
<ArrayItems>
99
<Size>len</Size>
10-
<ValuePointer>buf.ptr.pointer.__0</ValuePointer>
10+
<ValuePointer>buf.ptr.pointer</ValuePointer>
1111
</ArrayItems>
1212
</Expand>
1313
</Type>
14-
<Type Name="alloc::vec_deque::VecDeque&lt;*&gt;">
14+
<Type Name="alloc::collections::vec_deque::VecDeque&lt;*&gt;">
1515
<DisplayString>{{ size={tail &lt;= head ? head - tail : buf.cap - tail + head} }}</DisplayString>
1616
<Expand>
1717
<Item Name="[size]" ExcludeView="simple">tail &lt;= head ? head - tail : buf.cap - tail + head</Item>
@@ -24,19 +24,19 @@
2424
<If Condition="i == head">
2525
<Break/>
2626
</If>
27-
<Item>buf.ptr.pointer.__0 + i</Item>
27+
<Item>buf.ptr.pointer[i]</Item>
2828
<Exec>i = (i + 1 == buf.cap ? 0 : i + 1)</Exec>
2929
</Loop>
3030
</CustomListItems>
3131
</Expand>
3232
</Type>
33-
<Type Name="alloc::linked_list::LinkedList&lt;*&gt;">
33+
<Type Name="alloc::collections::linked_list::LinkedList&lt;*&gt;">
3434
<DisplayString>{{ size={len} }}</DisplayString>
3535
<Expand>
3636
<LinkedListItems>
3737
<Size>len</Size>
38-
<HeadPointer>*(alloc::linked_list::Node&lt;$T1&gt; **)&amp;head</HeadPointer>
39-
<NextPointer>*(alloc::linked_list::Node&lt;$T1&gt; **)&amp;next</NextPointer>
38+
<HeadPointer>*(alloc::collections::linked_list::Node&lt;$T1&gt; **)&amp;head</HeadPointer>
39+
<NextPointer>*(alloc::collections::linked_list::Node&lt;$T1&gt; **)&amp;next</NextPointer>
4040
<ValueNode>element</ValueNode>
4141
</LinkedListItems>
4242
</Expand>

src/etc/natvis/libcore.natvis

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
33
<Type Name="core::ptr::Unique&lt;*&gt;">
4-
<DisplayString>{{ Unique {*pointer.__0} }}</DisplayString>
4+
<DisplayString>{{ Unique {pointer} }}</DisplayString>
55
<Expand>
6-
<Item Name="[ptr]">pointer.__0</Item>
6+
<Item Name="[ptr]">pointer</Item>
77
</Expand>
88
</Type>
99
<Type Name="core::ptr::Shared&lt;*&gt;">
10-
<DisplayString>{{ Shared {*pointer.__0} }}</DisplayString>
10+
<DisplayString>{{ Shared {pointer} }}</DisplayString>
1111
<Expand>
12-
<Item Name="[ptr]">pointer.__0</Item>
12+
<Item Name="[ptr]">pointer</Item>
1313
</Expand>
1414
</Type>
1515
<Type Name="core::option::Option&lt;*&gt;">

0 commit comments

Comments
 (0)