@@ -176,10 +176,13 @@ impl<T, A: AllocRef> Box<T, A> {
176176 /// # Example
177177 ///
178178 /// ```
179- /// use alloc_wg::{alloc::Global, boxed::Box};
179+ /// use alloc_wg::{
180+ /// alloc::{AbortAlloc, Global},
181+ /// boxed::Box,
182+ /// };
180183 ///
181184 /// # #[allow(unused_variables)]
182- /// let five = Box::new_in(5, Global);
185+ /// let five = Box::new_in(5, AbortAlloc( Global) );
183186 /// ```
184187 #[ allow( clippy:: inline_always) ]
185188 #[ inline( always) ]
@@ -222,9 +225,12 @@ impl<T, A: AllocRef> Box<T, A> {
222225 /// # Example
223226 ///
224227 /// ```
225- /// use alloc_wg::{alloc::Global, boxed::Box};
228+ /// use alloc_wg::{
229+ /// alloc::{AbortAlloc, Global},
230+ /// boxed::Box,
231+ /// };
226232 ///
227- /// let mut five = Box::<u32, _>::new_uninit_in(Global);
233+ /// let mut five = Box::<u32, _>::new_uninit_in(AbortAlloc( Global) );
228234 ///
229235 /// let five = unsafe {
230236 /// // Deferred initialization:
@@ -280,7 +286,7 @@ impl<T, A: AllocRef> Box<T, A> {
280286 #[ inline( always) ]
281287 pub fn pin_in ( x : T , a : A ) -> Pin < Self >
282288 where
283- A : AllocRef < Error = !> ,
289+ A : AllocRef < Error = !>
284290 {
285291 let Ok ( b) = Self :: try_pin_in ( x, a) ;
286292 b
@@ -331,9 +337,12 @@ impl<T, A: AllocRef<Error = !>> Box<[T], A> {
331337 /// # Example
332338 ///
333339 /// ```
334- /// use alloc_wg::{alloc::Global, boxed::Box};
340+ /// use alloc_wg::{
341+ /// alloc::{AbortAlloc, Global},
342+ /// boxed::Box,
343+ /// };
335344 ///
336- /// let mut values = Box::<[u32], _> ::new_uninit_slice_in(3, Global);
345+ /// let mut values = Box::<[u32], AbortAlloc<Global>> ::new_uninit_slice_in(3, AbortAlloc( Global) );
337346 ///
338347 /// let values = unsafe {
339348 /// // Deferred initialization:
@@ -777,7 +786,7 @@ where
777786#[ allow( clippy:: use_self) ]
778787impl < T , A : AllocRef < Error = !> > Default for Box < [ T ] , A >
779788where
780- A : Default + AllocRef ,
789+ A : Default + AllocRef < Error = ! > ,
781790{
782791 #[ must_use]
783792 fn default ( ) -> Self {
@@ -794,7 +803,7 @@ unsafe fn from_boxed_utf8_unchecked<A: DeallocRef>(v: Box<[u8], A>) -> Box<str,
794803#[ allow( clippy:: use_self) ]
795804impl < A : AllocRef < Error = !> > Default for Box < str , A >
796805where
797- A : Default + AllocRef ,
806+ A : Default + AllocRef < Error = ! > ,
798807{
799808 #[ must_use]
800809 fn default ( ) -> Self {
@@ -804,7 +813,7 @@ where
804813
805814impl < T : Clone , A : AllocRef < Error = !> > Clone for Box < T , A >
806815where
807- A : AllocRef ,
816+ A : AllocRef < Error = ! > ,
808817 A :: BuildAlloc : Clone ,
809818{
810819 /// Returns a new box with a `clone()` of this box's contents.
@@ -971,7 +980,7 @@ impl<T: ?Sized + Hasher, A: DeallocRef> Hasher for Box<T, A> {
971980
972981impl < T , A : AllocRef < Error = !> > From < T > for Box < T , A >
973982where
974- A : Default + AllocRef ,
983+ A : Default + AllocRef < Error = ! > ,
975984{
976985 /// Converts a generic type `T` into a `Box<T>`
977986 ///
@@ -1288,8 +1297,11 @@ macro_rules! impl_dispatch_from_dyn {
12881297}
12891298
12901299impl_dispatch_from_dyn ! ( Global ) ;
1300+ impl_dispatch_from_dyn ! ( AbortAlloc <Global >) ;
12911301#[ cfg( feature = "std" ) ]
12921302impl_dispatch_from_dyn ! ( std:: alloc:: System ) ;
1303+ #[ cfg( feature = "std" ) ]
1304+ impl_dispatch_from_dyn ! ( AbortAlloc <std:: alloc:: System >) ;
12931305
12941306#[ allow( clippy:: items_after_statements) ]
12951307impl < T : Clone , A : Clone > Clone for Box < [ T ] , A >
0 commit comments