@@ -267,7 +267,8 @@ class StdVecSyntheticProvider:
267
267
"""Pretty-printer for alloc::vec::Vec<T>
268
268
269
269
struct Vec<T> { buf: RawVec<T>, len: usize }
270
- struct RawVec<T> { ptr: Unique<T>, cap: usize, ... }
270
+ rust 1.75: struct RawVec<T> { ptr: Unique<T>, cap: usize, ... }
271
+ rust 1.76: struct RawVec<T> { ptr: Unique<T>, cap: Cap(usize), ... }
271
272
rust 1.31.1: struct Unique<T: ?Sized> { pointer: NonZero<*const T>, ... }
272
273
rust 1.33.0: struct Unique<T: ?Sized> { pointer: *const T, ... }
273
274
rust 1.62.0: struct Unique<T: ?Sized> { pointer: NonNull<T>, ... }
@@ -390,7 +391,10 @@ def update(self):
390
391
self .head = self .valobj .GetChildMemberWithName ("head" ).GetValueAsUnsigned ()
391
392
self .size = self .valobj .GetChildMemberWithName ("len" ).GetValueAsUnsigned ()
392
393
self .buf = self .valobj .GetChildMemberWithName ("buf" )
393
- self .cap = self .buf .GetChildMemberWithName ("cap" ).GetValueAsUnsigned ()
394
+ cap = self .buf .GetChildMemberWithName ("cap" )
395
+ if cap .GetType ().num_fields == 1 :
396
+ cap = cap .GetChildAtIndex (0 )
397
+ self .cap = cap .GetValueAsUnsigned ()
394
398
395
399
self .data_ptr = unwrap_unique_or_non_null (self .buf .GetChildMemberWithName ("ptr" ))
396
400
0 commit comments