Lines Matching refs:Arc
13 use crate::alloc::sync::Arc;
135 unsafe impl<T: ?Sized> PointerOps for DefaultPointerOps<Arc<T>> {
137 type Pointer = Arc<T>;
140 unsafe fn from_raw(&self, raw: *const T) -> Arc<T> { in from_raw()
141 Arc::from_raw(raw) in from_raw()
145 fn into_raw(&self, ptr: Arc<T>) -> *const T { in into_raw()
146 Arc::into_raw(ptr) in into_raw()
196 use std::sync::Arc;
229 let pointer_ops = DefaultPointerOps::<Arc<_>>::new(); in test_arc()
230 let p = Arc::new(1); in test_arc()
234 let p2: Arc<i32> = pointer_ops.from_raw(r); in test_arc()
277 let pointer_ops = DefaultPointerOps::<Arc<_>>::new(); in test_arc_unsized()
278 let p = Arc::new(1) as Arc<dyn Debug>; in test_arc_unsized()
284 let p2: Arc<dyn Debug> = pointer_ops.from_raw(r); in test_arc_unsized()
295 let pointer_ops = DefaultPointerOps::<Arc<_>>::new(); in clone_arc_from_raw()
296 let p = Arc::new(1); in clone_arc_from_raw()
298 let p2: Arc<i32> = clone_pointer_from_raw(&pointer_ops, raw); in clone_arc_from_raw()
299 assert_eq!(2, Arc::strong_count(&p2)); in clone_arc_from_raw()