Lines Matching refs:Box
9 use crate::alloc::boxed::Box;
103 unsafe impl<T: ?Sized> PointerOps for DefaultPointerOps<Box<T>> {
105 type Pointer = Box<T>;
108 unsafe fn from_raw(&self, raw: *const T) -> Box<T> { in from_raw()
109 Box::from_raw(raw as *mut T) in from_raw()
113 fn into_raw(&self, ptr: Box<T>) -> *const T { in into_raw()
114 Box::into_raw(ptr) as *const T in into_raw()
192 use std::boxed::Box;
201 let pointer_ops = DefaultPointerOps::<Box<_>>::new(); in test_box()
202 let p = Box::new(1); in test_box()
206 let p2: Box<i32> = pointer_ops.from_raw(r); in test_box()
243 let pointer_ops = DefaultPointerOps::<Box<_>>::new(); in test_box_unsized()
244 let p = Box::new(1) as Box<dyn Debug>; in test_box_unsized()
250 let p2: Box<dyn Debug> = pointer_ops.from_raw(r); in test_box_unsized()