Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for allocators in Rc & Arc #89132

Merged
merged 5 commits into from
Jul 17, 2023
Merged
Changes from 1 commit
Commits
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
Update debuginfo test output to describe new structure of Rc/Arc
tgross35 committed Jul 3, 2023
commit 34f6d2414cea30003491b4debbfd8c059b09125b
24 changes: 12 additions & 12 deletions tests/debuginfo/rc_arc.rs
Original file line number Diff line number Diff line change
@@ -27,37 +27,37 @@
// cdb-command:g

// cdb-command:dx rc,d
// cdb-check:rc,d : 111 [Type: alloc::rc::Rc<i32>]
// cdb-check:rc,d : 111 [Type: alloc::rc::Rc<i32,alloc::alloc::Global>]
// cdb-check: [Reference count] : 11 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]

// cdb-command:dx weak_rc,d
// cdb-check:weak_rc,d : 111 [Type: alloc::rc::Weak<i32>]
// cdb-check:weak_rc,d : 111 [Type: alloc::rc::Weak<i32,alloc::alloc::Global>]
// cdb-check: [Reference count] : 11 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]

// cdb-command:dx arc,d
// cdb-check:arc,d : 222 [Type: alloc::sync::Arc<i32>]
// cdb-check:arc,d : 222 [Type: alloc::sync::Arc<i32,alloc::alloc::Global>]
// cdb-check: [Reference count] : 21 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]

// cdb-command:dx weak_arc,d
// cdb-check:weak_arc,d : 222 [Type: alloc::sync::Weak<i32>]
// cdb-check:weak_arc,d : 222 [Type: alloc::sync::Weak<i32,alloc::alloc::Global>]
// cdb-check: [Reference count] : 21 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]

// cdb-command:dx dyn_rc,d
// cdb-check:dyn_rc,d [Type: alloc::rc::Rc<dyn$<core::fmt::Debug> >]
// cdb-check:dyn_rc,d [Type: alloc::rc::Rc<dyn$<core::fmt::Debug>,alloc::alloc::Global>]
// cdb-check: [Reference count] : 31 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]

// cdb-command:dx dyn_rc_weak,d
// cdb-check:dyn_rc_weak,d [Type: alloc::rc::Weak<dyn$<core::fmt::Debug> >]
// cdb-check:dyn_rc_weak,d [Type: alloc::rc::Weak<dyn$<core::fmt::Debug>,alloc::alloc::Global>]
// cdb-check: [Reference count] : 31 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]

// cdb-command:dx slice_rc,d
// cdb-check:slice_rc,d : { len=3 } [Type: alloc::rc::Rc<slice2$<u32> >]
// cdb-check:slice_rc,d : { len=3 } [Type: alloc::rc::Rc<slice2$<u32>,alloc::alloc::Global>]
// cdb-check: [Length] : 3 [Type: [...]]
// cdb-check: [Reference count] : 41 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]
@@ -66,7 +66,7 @@
// cdb-check: [2] : 3 [Type: u32]

// cdb-command:dx slice_rc_weak,d
// cdb-check:slice_rc_weak,d : { len=3 } [Type: alloc::rc::Weak<slice2$<u32> >]
// cdb-check:slice_rc_weak,d : { len=3 } [Type: alloc::rc::Weak<slice2$<u32>,alloc::alloc::Global>]
// cdb-check: [Length] : 3 [Type: [...]]
// cdb-check: [Reference count] : 41 [Type: core::cell::Cell<usize>]
// cdb-check: [Weak reference count] : 2 [Type: core::cell::Cell<usize>]
@@ -75,17 +75,17 @@
// cdb-check: [2] : 3 [Type: u32]

// cdb-command:dx dyn_arc,d
// cdb-check:dyn_arc,d [Type: alloc::sync::Arc<dyn$<core::fmt::Debug> >]
// cdb-check:dyn_arc,d [Type: alloc::sync::Arc<dyn$<core::fmt::Debug>,alloc::alloc::Global>]
// cdb-check: [Reference count] : 51 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]

// cdb-command:dx dyn_arc_weak,d
// cdb-check:dyn_arc_weak,d [Type: alloc::sync::Weak<dyn$<core::fmt::Debug> >]
// cdb-check:dyn_arc_weak,d [Type: alloc::sync::Weak<dyn$<core::fmt::Debug>,alloc::alloc::Global>]
// cdb-check: [Reference count] : 51 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]

// cdb-command:dx slice_arc,d
// cdb-check:slice_arc,d : { len=3 } [Type: alloc::sync::Arc<slice2$<u32> >]
// cdb-check:slice_arc,d : { len=3 } [Type: alloc::sync::Arc<slice2$<u32>,alloc::alloc::Global>]
// cdb-check: [Length] : 3 [Type: [...]]
// cdb-check: [Reference count] : 61 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]
@@ -94,7 +94,7 @@
// cdb-check: [2] : 6 [Type: u32]

// cdb-command:dx slice_arc_weak,d
// cdb-check:slice_arc_weak,d : { len=3 } [Type: alloc::sync::Weak<slice2$<u32> >]
// cdb-check:slice_arc_weak,d : { len=3 } [Type: alloc::sync::Weak<slice2$<u32>,alloc::alloc::Global>]
// cdb-check: [Length] : 3 [Type: [...]]
// cdb-check: [Reference count] : 61 [Type: core::sync::atomic::AtomicUsize]
// cdb-check: [Weak reference count] : 2 [Type: core::sync::atomic::AtomicUsize]
2 changes: 1 addition & 1 deletion tests/debuginfo/thread.rs
Original file line number Diff line number Diff line change
@@ -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> >]
// cdb-check:[...] inner [...][Type: core::pin::Pin<alloc::sync::Arc<std::thread::Inner>,alloc::alloc::Global>]

use std::thread;