Lines Matching refs:Box
169 use alloc::boxed::Box;
175 ghost: PhantomData<Option<Box<T>>>,
188 drop(unsafe { Box::from_raw(ptr) }) in drop()
212 pub fn set(&self, value: Box<T>) -> Result<(), Box<T>> { in set()
213 let ptr = Box::into_raw(value); in set()
221 let value = unsafe { Box::from_raw(ptr) }; in set()
235 F: FnOnce() -> Box<T>, in get_or_init()
238 match self.get_or_try_init(|| Ok::<Box<T>, Void>(f())) { in get_or_init()
253 F: FnOnce() -> Result<Box<T>, E>, in get_or_try_init()
259 ptr = Box::into_raw(val); in get_or_try_init()
267 drop(unsafe { Box::from_raw(ptr) }); in get_or_try_init()