about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWesley Wiser <wesleywiser@microsoft.com>2023-07-17 15:51:46 -0400
committerWesley Wiser <wesleywiser@microsoft.com>2023-07-17 15:51:46 -0400
commit12bed9d8cc7a63e6e7a7b147f91051ddf0f217bd (patch)
tree7b466395c278a1bb127981e663a479d2635428f9
parentfed3c8cd28a42988a8379a3e61694dc7fa7a9e6a (diff)
downloadrust-12bed9d8cc7a63e6e7a7b147f91051ddf0f217bd.tar.gz
rust-12bed9d8cc7a63e6e7a7b147f91051ddf0f217bd.zip
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.
-rw-r--r--src/etc/natvis/liballoc.natvis13
-rw-r--r--tests/debuginfo/thread.rs2
2 files changed, 9 insertions, 6 deletions
diff --git a/src/etc/natvis/liballoc.natvis b/src/etc/natvis/liballoc.natvis
index c4ad98ec1d3..00c17d83322 100644
--- a/src/etc/natvis/liballoc.natvis
+++ b/src/etc/natvis/liballoc.natvis
@@ -66,7 +66,10 @@
       dyn pointees.
 
       Rc<[T]> and Arc<[T]> are handled separately altogether so we can actually show
-      the slice values.
+      the slice values. These visualizers have a second wildcard `foo&lt;slice2$&lt;*&gt;, *&gt;`
+      which accounts for the allocator parameter. This isn't needed for the other visualizers since
+      their inner `*` eats the type parameter but since the slice ones match part of the type params
+      it is necessary for them.
   -->
   <!-- alloc::rc::Rc<T> -->
   <Type Name="alloc::rc::Rc&lt;*&gt;">
@@ -84,7 +87,7 @@
   </Type>
 
   <!-- alloc::rc::Rc<[T]> -->
-  <Type Name="alloc::rc::Rc&lt;slice2$&lt;*&gt; &gt;">
+  <Type Name="alloc::rc::Rc&lt;slice2$&lt;*&gt;,*&gt;">
     <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
     <Expand>
       <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
@@ -114,7 +117,7 @@
   </Type>
 
   <!-- alloc::rc::Weak<[T]> -->
-  <Type Name="alloc::rc::Weak&lt;slice2$&lt;*&gt; &gt;">
+  <Type Name="alloc::rc::Weak&lt;slice2$&lt;*&gt;,*&gt;">
     <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
     <Expand>
       <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
@@ -143,7 +146,7 @@
   </Type>
 
   <!-- alloc::sync::Arc<[T]> -->
-  <Type Name="alloc::sync::Arc&lt;slice2$&lt;*&gt; &gt;">
+  <Type Name="alloc::sync::Arc&lt;slice2$&lt;*&gt;,*&gt;">
     <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
     <Expand>
       <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
@@ -172,7 +175,7 @@
   </Type>
 
   <!-- alloc::sync::Weak<[T]> -->
-  <Type Name="alloc::sync::Weak&lt;slice2$&lt;*&gt; &gt;">
+  <Type Name="alloc::sync::Weak&lt;slice2$&lt;*&gt;,*&gt;">
     <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString>
     <Expand>
       <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item>
diff --git a/tests/debuginfo/thread.rs b/tests/debuginfo/thread.rs
index 0f7d6965034..5516f4fec3e 100644
--- a/tests/debuginfo/thread.rs
+++ b/tests/debuginfo/thread.rs
@@ -14,7 +14,7 @@
 //
 // cdb-command:dx t,d
 // cdb-check:t,d              : [...] [Type: std::thread::Thread *]
-// cdb-check:[...] inner [...][Type: core::pin::Pin<alloc::sync::Arc<std::thread::Inner,alloc::alloc::Global>>]
+// cdb-check:[...] inner [...][Type: core::pin::Pin<alloc::sync::Arc<std::thread::Inner,alloc::alloc::Global> >]
 
 use std::thread;