Skip to content

Commit 12bed9d

Browse files
committed
Update natvis to match full type names for Arc, Rc, Weak, etc
Also update a test case to have the correct whitespace in a type name.
1 parent fed3c8c commit 12bed9d

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/etc/natvis/liballoc.natvis

+8-5
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@
6666
dyn pointees.
6767
6868
Rc<[T]> and Arc<[T]> are handled separately altogether so we can actually show
69-
the slice values.
69+
the slice values. These visualizers have a second wildcard `foo&lt;slice2$&lt;*&gt;, *&gt;`
70+
which accounts for the allocator parameter. This isn't needed for the other visualizers since
71+
their inner `*` eats the type parameter but since the slice ones match part of the type params
72+
it is necessary for them.
7073
-->
7174
<!-- alloc::rc::Rc<T> -->
7275
<Type Name="alloc::rc::Rc&lt;*&gt;">
@@ -84,7 +87,7 @@
8487
</Type>
8588

8689
<!-- alloc::rc::Rc<[T]> -->
87-
<Type Name="alloc::rc::Rc&lt;slice2$&lt;*&gt; &gt;">
90+
<Type Name="alloc::rc::Rc&lt;slice2$&lt;*&gt;,*&gt;">
8891
<DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
8992
<Expand>
9093
<Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
@@ -114,7 +117,7 @@
114117
</Type>
115118

116119
<!-- alloc::rc::Weak<[T]> -->
117-
<Type Name="alloc::rc::Weak&lt;slice2$&lt;*&gt; &gt;">
120+
<Type Name="alloc::rc::Weak&lt;slice2$&lt;*&gt;,*&gt;">
118121
<DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
119122
<Expand>
120123
<Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
@@ -143,7 +146,7 @@
143146
</Type>
144147

145148
<!-- alloc::sync::Arc<[T]> -->
146-
<Type Name="alloc::sync::Arc&lt;slice2$&lt;*&gt; &gt;">
149+
<Type Name="alloc::sync::Arc&lt;slice2$&lt;*&gt;,*&gt;">
147150
<DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
148151
<Expand>
149152
<Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
@@ -172,7 +175,7 @@
172175
</Type>
173176

174177
<!-- alloc::sync::Weak<[T]> -->
175-
<Type Name="alloc::sync::Weak&lt;slice2$&lt;*&gt; &gt;">
178+
<Type Name="alloc::sync::Weak&lt;slice2$&lt;*&gt;,*&gt;">
176179
<DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
177180
<Expand>
178181
<Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>

tests/debuginfo/thread.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
//
1515
// cdb-command:dx t,d
1616
// cdb-check:t,d : [...] [Type: std::thread::Thread *]
17-
// cdb-check:[...] inner [...][Type: core::pin::Pin<alloc::sync::Arc<std::thread::Inner,alloc::alloc::Global>>]
17+
// cdb-check:[...] inner [...][Type: core::pin::Pin<alloc::sync::Arc<std::thread::Inner,alloc::alloc::Global> >]
1818

1919
use std::thread;
2020

0 commit comments

Comments
 (0)