diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:18:21 +0000 |
commit | 4e8199b572f2035b7749cba276ece3a26630d23e (patch) | |
tree | f09feeed6a0fe39d027b1908aa63ea6b35e4b631 /src/etc/natvis | |
parent | Adding upstream version 1.66.0+dfsg1. (diff) | |
download | rustc-4e8199b572f2035b7749cba276ece3a26630d23e.tar.xz rustc-4e8199b572f2035b7749cba276ece3a26630d23e.zip |
Adding upstream version 1.67.1+dfsg1.upstream/1.67.1+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/etc/natvis')
-rw-r--r-- | src/etc/natvis/intrinsic.natvis | 12 | ||||
-rw-r--r-- | src/etc/natvis/liballoc.natvis | 23 |
2 files changed, 21 insertions, 14 deletions
diff --git a/src/etc/natvis/intrinsic.natvis b/src/etc/natvis/intrinsic.natvis index 277e57aaf..8c16a562e 100644 --- a/src/etc/natvis/intrinsic.natvis +++ b/src/etc/natvis/intrinsic.natvis @@ -1,6 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010"> - <Type Name="str"> + <Type Name="ref$<str$>"> + <AlternativeType Name="ref_mut$<str$>" /> + <AlternativeType Name="ptr_const$<str$>" /> + <AlternativeType Name="ptr_mut$<str$>" /> + <DisplayString>{(char*)data_ptr,[length]s8}</DisplayString> <StringView>(char*)data_ptr,[length]s8</StringView> <Expand> @@ -15,7 +19,11 @@ </Synthetic> </Expand> </Type> - <Type Name="slice$<*>"> + <Type Name="ref$<slice2$<*> >"> + <AlternativeType Name="ref_mut$<slice2$<*> >" /> + <AlternativeType Name="ptr_const$<slice2$<*> >" /> + <AlternativeType Name="ptr_mut$<slice2$<*> >" /> + <DisplayString>{{ len={length} }}</DisplayString> <Expand> <Item Name="[len]" ExcludeView="simple">length</Item> diff --git a/src/etc/natvis/liballoc.natvis b/src/etc/natvis/liballoc.natvis index bf6c02b91..c4ad98ec1 100644 --- a/src/etc/natvis/liballoc.natvis +++ b/src/etc/natvis/liballoc.natvis @@ -12,20 +12,19 @@ </Expand> </Type> <Type Name="alloc::collections::vec_deque::VecDeque<*>"> - <DisplayString>{{ len={tail <= head ? head - tail : buf.cap - tail + head} }}</DisplayString> + <DisplayString>{{ len={len} }}</DisplayString> <Expand> - <Item Name="[len]" ExcludeView="simple">tail <= head ? head - tail : buf.cap - tail + head</Item> + <Item Name="[len]" ExcludeView="simple">len</Item> <Item Name="[capacity]" ExcludeView="simple">buf.cap</Item> <CustomListItems> - <Variable Name="i" InitialValue="tail" /> - - <Size>tail <= head ? head - tail : buf.cap - tail + head</Size> + <Variable Name="i" InitialValue="0" /> + <Size>len</Size> <Loop> - <If Condition="i == head"> + <If Condition="i == len"> <Break/> </If> - <Item>buf.ptr.pointer.pointer[i]</Item> - <Exec>i = (i + 1 == buf.cap ? 0 : i + 1)</Exec> + <Item>buf.ptr.pointer.pointer[(i + head) % buf.cap]</Item> + <Exec>i = i + 1</Exec> </Loop> </CustomListItems> </Expand> @@ -85,7 +84,7 @@ </Type> <!-- alloc::rc::Rc<[T]> --> - <Type Name="alloc::rc::Rc<slice$<*> >"> + <Type Name="alloc::rc::Rc<slice2$<*> >"> <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString> <Expand> <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item> @@ -115,7 +114,7 @@ </Type> <!-- alloc::rc::Weak<[T]> --> - <Type Name="alloc::rc::Weak<slice$<*> >"> + <Type Name="alloc::rc::Weak<slice2$<*> >"> <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString> <Expand> <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item> @@ -144,7 +143,7 @@ </Type> <!-- alloc::sync::Arc<[T]> --> - <Type Name="alloc::sync::Arc<slice$<*> >"> + <Type Name="alloc::sync::Arc<slice2$<*> >"> <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString> <Expand> <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item> @@ -173,7 +172,7 @@ </Type> <!-- alloc::sync::Weak<[T]> --> - <Type Name="alloc::sync::Weak<slice$<*> >"> + <Type Name="alloc::sync::Weak<slice2$<*> >"> <DisplayString>{{ len={ptr.pointer.length} }}</DisplayString> <Expand> <Item Name="[Length]" ExcludeView="simple">ptr.pointer.length</Item> |