7979//! [`NonZeroLayout::for_value(&*value)`]: crate::alloc::NonZeroLayout::for_value
8080
8181use crate :: {
82- alloc:: { AbortAlloc , AllocRef , BuildAllocRef , DeallocRef , Global , NonZeroLayout } ,
82+ alloc:: { AbortAlloc , AllocRef , BuildAllocRef , DeallocRef , Global , NonZeroLayout , Panic } ,
8383 clone:: CloneIn ,
8484 collections:: CollectionAllocErr ,
8585 raw_vec:: RawVec ,
@@ -188,7 +188,7 @@ impl<T, A: AllocRef> Box<T, A> {
188188 #[ inline( always) ]
189189 pub fn new_in ( x : T , a : A ) -> Self
190190 where
191- A : AllocRef < Error = ! > ,
191+ A : AllocRef < Error = Panic > ,
192192 {
193193 let Ok ( b) = Self :: try_new_in ( x, a) ;
194194 b
@@ -245,7 +245,7 @@ impl<T, A: AllocRef> Box<T, A> {
245245 #[ inline( always) ]
246246 pub fn new_uninit_in ( a : A ) -> Box < mem:: MaybeUninit < T > , A >
247247 where
248- A : AllocRef < Error = ! > ,
248+ A : AllocRef < Error = Panic > ,
249249 {
250250 let Ok ( b) = Self :: try_new_uninit_in ( a) ;
251251 b
@@ -286,7 +286,7 @@ impl<T, A: AllocRef> Box<T, A> {
286286 #[ inline( always) ]
287287 pub fn pin_in ( x : T , a : A ) -> Pin < Self >
288288 where
289- A : AllocRef < Error = ! > ,
289+ A : AllocRef < Error = Panic > ,
290290 {
291291 let Ok ( b) = Self :: try_pin_in ( x, a) ;
292292 b
@@ -331,7 +331,7 @@ impl<T> Box<[T]> {
331331}
332332
333333#[ allow( clippy:: use_self) ]
334- impl < T , A : AllocRef < Error = ! > > Box < [ T ] , A > {
334+ impl < T , A : AllocRef < Error = Panic > > Box < [ T ] , A > {
335335 /// Construct a new boxed slice with uninitialized contents with the spoecified allocator.
336336 ///
337337 /// # Example
@@ -775,7 +775,7 @@ unsafe impl<#[may_dangle] T: ?Sized, A: DeallocRef> Drop for Box<T, A> {
775775impl < T , A > Default for Box < T , A >
776776where
777777 T : Default ,
778- A : Default + AllocRef < Error = ! > ,
778+ A : Default + AllocRef < Error = Panic > ,
779779{
780780 #[ must_use]
781781 fn default ( ) -> Self {
@@ -784,9 +784,9 @@ where
784784}
785785
786786#[ allow( clippy:: use_self) ]
787- impl < T , A : AllocRef < Error = ! > > Default for Box < [ T ] , A >
787+ impl < T , A : AllocRef < Error = Panic > > Default for Box < [ T ] , A >
788788where
789- A : Default + AllocRef < Error = ! > ,
789+ A : Default + AllocRef < Error = Panic > ,
790790{
791791 #[ must_use]
792792 fn default ( ) -> Self {
@@ -801,19 +801,19 @@ unsafe fn from_boxed_utf8_unchecked<A: DeallocRef>(v: Box<[u8], A>) -> Box<str,
801801}
802802
803803#[ allow( clippy:: use_self) ]
804- impl < A : AllocRef < Error = ! > > Default for Box < str , A >
804+ impl < A : AllocRef < Error = Panic > > Default for Box < str , A >
805805where
806- A : Default + AllocRef < Error = ! > ,
806+ A : Default + AllocRef < Error = Panic > ,
807807{
808808 #[ must_use]
809809 fn default ( ) -> Self {
810810 unsafe { from_boxed_utf8_unchecked ( Box :: default ( ) ) }
811811 }
812812}
813813
814- impl < T : Clone , A : AllocRef < Error = ! > > Clone for Box < T , A >
814+ impl < T : Clone , A : AllocRef < Error = Panic > > Clone for Box < T , A >
815815where
816- A : AllocRef < Error = ! > ,
816+ A : AllocRef < Error = Panic > ,
817817 A :: BuildAlloc : Clone ,
818818{
819819 /// Returns a new box with a `clone()` of this box's contents.
@@ -876,7 +876,7 @@ impl<T: Clone, A: AllocRef, B: AllocRef> CloneIn<B> for Box<T, A> {
876876
877877 fn clone_in ( & self , a : B ) -> Self :: Cloned
878878 where
879- B : AllocRef < Error = ! > ,
879+ B : AllocRef < Error = Panic > ,
880880 {
881881 Box :: new_in ( self . as_ref ( ) . clone ( ) , a)
882882 }
@@ -978,9 +978,9 @@ impl<T: ?Sized + Hasher, A: DeallocRef> Hasher for Box<T, A> {
978978 }
979979}
980980
981- impl < T , A : AllocRef < Error = ! > > From < T > for Box < T , A >
981+ impl < T , A : AllocRef < Error = Panic > > From < T > for Box < T , A >
982982where
983- A : Default + AllocRef < Error = ! > ,
983+ A : Default + AllocRef < Error = Panic > ,
984984{
985985 /// Converts a generic type `T` into a `Box<T>`
986986 ///
@@ -1014,7 +1014,7 @@ impl<T: ?Sized, A: DeallocRef> From<Box<T, A>> for Pin<Box<T, A>> {
10141014#[ allow( clippy:: use_self) ]
10151015impl < T : Copy , A > From < & [ T ] > for Box < [ T ] , A >
10161016where
1017- A : Default + AllocRef < Error = ! > ,
1017+ A : Default + AllocRef < Error = Panic > ,
10181018{
10191019 /// Converts a `&[T]` into a `Box<[T], B>`
10201020 ///
@@ -1043,7 +1043,7 @@ where
10431043#[ allow( clippy:: use_self) ]
10441044impl < A > From < & str > for Box < str , A >
10451045where
1046- A : Default + AllocRef < Error = ! > ,
1046+ A : Default + AllocRef < Error = Panic > ,
10471047{
10481048 /// Converts a `&str` into a `Box<str>`
10491049 ///
@@ -1306,7 +1306,7 @@ impl_dispatch_from_dyn!(AbortAlloc<std::alloc::System>);
13061306#[ allow( clippy:: items_after_statements) ]
13071307impl < T : Clone , A : Clone > Clone for Box < [ T ] , A >
13081308where
1309- A : AllocRef < Error = ! > ,
1309+ A : AllocRef < Error = Panic > ,
13101310 A :: BuildAlloc : Clone ,
13111311{
13121312 fn clone ( & self ) -> Self {
0 commit comments