Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
03f2cf2
Make `--force-warns` a normal lint level option
inquisitivecrystal Jul 8, 2021
07f1e61
Add natvis for NonZero and Wrapping types
wesleywiser Jun 28, 2021
9740dcc
Add natvis for Atomic types
wesleywiser Jun 29, 2021
cad42e0
Add natvis for cell types
wesleywiser Jun 29, 2021
8f1eec3
Fixup natvis for NonNull and Unique types
wesleywiser Jun 29, 2021
f2aba34
Add natvis for Range types
wesleywiser Jun 29, 2021
691ee05
Add natvis for Duration, ManuallyDrop and Pin types
wesleywiser Jun 30, 2021
a6a82c6
Add/improve visualizations for liballoc types
wesleywiser Jun 30, 2021
8500274
Add visualizer for OsString and fixup other string visualizers
wesleywiser Jul 1, 2021
eb3a527
Address review comments
inquisitivecrystal Jul 9, 2021
dbdce6e
Add tests for command line lint control
inquisitivecrystal Jul 9, 2021
d1852e1
Respond to review feedback
wesleywiser Jul 9, 2021
10b536f
ExprUseVisitor: treat ByValue use of Copy types as ImmBorrow
arora-aman Jul 11, 2021
14fdf8a
Add test for `Unique<T>`, weak ref counts and ref counts for `Weak<T>`
wesleywiser Jul 12, 2021
36f51c9
Add test for copy type in move closure
arora-aman Jul 14, 2021
6c3774e
ExprUseVisitor::Delegate consume only when moving
arora-aman Jul 14, 2021
6e357bc
Fix tests for i686
wesleywiser Jul 14, 2021
4b10218
Remove refs from pat slices
camsteffen Jul 14, 2021
c4ac836
PR feedback
arora-aman Jul 15, 2021
75291ee
Update compiler/rustc_typeck/src/expr_use_visitor.rs
nikomatsakis Jul 15, 2021
d49f977
Layout error instead of an ICE for packed and aligned types
tmiasko Mar 20, 2021
59103d1
Fix layout overflow in type declaration
GuillaumeGomez Jul 15, 2021
25e7403
Add regression test for type declaration layout overflow
GuillaumeGomez Jul 15, 2021
5287058
Rollup merge of #83319 - tmiasko:packed-aligned, r=jackh726
GuillaumeGomez Jul 15, 2021
2886cc8
Rollup merge of #86970 - inquisitivecrystal:force-warn, r=davidtwco
GuillaumeGomez Jul 15, 2021
be2eeb1
Rollup merge of #86983 - wesleywiser:natvis_std_types, r=michaelwoeri…
GuillaumeGomez Jul 15, 2021
5dd7ca3
Rollup merge of #87069 - sexxi-goose:copy_ref_always, r=nikomatsakis
GuillaumeGomez Jul 15, 2021
afbb612
Rollup merge of #87140 - camsteffen:pat-slice-refs, r=oli-obk
GuillaumeGomez Jul 15, 2021
86101d8
Rollup merge of #87162 - GuillaumeGomez:type-decl-overflow, r=notriddle
GuillaumeGomez Jul 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for Unique<T>, weak ref counts and ref counts for Weak<T>
  • Loading branch information
wesleywiser committed Jul 12, 2021
commit 14fdf8a115da7e88721dcbef6b35d8c6eab074f2
6 changes: 6 additions & 0 deletions src/etc/natvis/liballoc.natvis
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,15 @@
<Expand>
<ExpandedItem>ptr.pointer->value</ExpandedItem>
<Item Name="[Reference count]">ptr.pointer->strong</Item>
<Item Name="[Weak reference count]">ptr.pointer->weak</Item>
</Expand>
</Type>
<Type Name="alloc::rc::Weak&lt;*&gt;">
<DisplayString>{ptr.pointer->value}</DisplayString>
<Expand>
<ExpandedItem>ptr.pointer->value</ExpandedItem>
<Item Name="[Reference count]">ptr.pointer->strong</Item>
<Item Name="[Weak reference count]">ptr.pointer->weak</Item>
</Expand>
</Type>

Expand All @@ -78,12 +81,15 @@
<Expand>
<ExpandedItem>ptr.pointer->data</ExpandedItem>
<Item Name="[Reference count]">ptr.pointer->strong</Item>
<Item Name="[Weak reference count]">ptr.pointer->weak</Item>
</Expand>
</Type>
<Type Name="alloc::sync::Weak&lt;*&gt;">
<DisplayString>{ptr.pointer->data}</DisplayString>
<Expand>
<ExpandedItem>ptr.pointer->data</ExpandedItem>
<Item Name="[Reference count]">ptr.pointer->strong</Item>
<Item Name="[Weak reference count]">ptr.pointer->weak</Item>
</Expand>
</Type>
<Type Name="alloc::borrow::Cow&lt;*&gt;">
Expand Down
12 changes: 11 additions & 1 deletion src/test/debuginfo/marker-types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,17 @@
// cdb-check: [capacity] : 0x4 [Type: unsigned __int64]
// cdb-check: [chars] : "this"

// cdb-command: dx unique
// cdb-check:unique : Unique(0x[...]: (0x2a, 4321)) [Type: core::ptr::unique::Unique<tuple$<u64,i32> >]
// cdb-check: [<Raw View>] [Type: core::ptr::unique::Unique<tuple$<u64,i32> >]
// cdb-check: [0] : 0x2a [Type: unsigned __int64]
// cdb-check: [1] : 4321 [Type: int]

#![feature(ptr_internals)]

use std::mem::ManuallyDrop;
use std::pin::Pin;
use std::ptr::NonNull;
use std::ptr::{NonNull, Unique};

fn main() {
let nonnull: NonNull<_> = (&12u32).into();
Expand All @@ -33,6 +41,8 @@ fn main() {
let mut s = "this".to_string();
let pin = Pin::new(&mut s);

let unique: Unique<_> = (&mut (42u64, 4321i32)).into();

zzz(); // #break
}

Expand Down
8 changes: 8 additions & 0 deletions src/test/debuginfo/rc_arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,37 @@
// cdb-check:r,d : 42 [Type: alloc::rc::Rc<i32>]
// cdb-check: [<Raw View>] [Type: alloc::rc::Rc<i32>]
// cdb-check: [Reference count] : 2 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]

// cdb-command:dx r1,d
// cdb-check:r1,d : 42 [Type: alloc::rc::Rc<i32>]
// cdb-check: [<Raw View>] [Type: alloc::rc::Rc<i32>]
// cdb-check: [Reference count] : 2 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]

// cdb-command:dx w1,d
// cdb-check:w1,d : 42 [Type: alloc::rc::Weak<i32>]
// cdb-check: [<Raw View>] [Type: alloc::rc::Weak<i32>]
// cdb-check: [Reference count] : 2 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]

// cdb-command:dx a,d
// cdb-check:a,d : 42 [Type: alloc::sync::Arc<i32>]
// cdb-check: [<Raw View>] [Type: alloc::sync::Arc<i32>]
// cdb-check: [Reference count] : 2 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]

// cdb-command:dx a1,d
// cdb-check:a1,d : 42 [Type: alloc::sync::Arc<i32>]
// cdb-check: [<Raw View>] [Type: alloc::sync::Arc<i32>]
// cdb-check: [Reference count] : 2 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]

// cdb-command:dx w2,d
// cdb-check:w2,d : 42 [Type: alloc::sync::Weak<i32>]
// cdb-check: [<Raw View>] [Type: alloc::sync::Weak<i32>]
// cdb-check: [Reference count] : 2 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]

use std::rc::Rc;
use std::sync::Arc;
Expand Down