@@ -739,7 +739,7 @@ unsafe impl<#[may_dangle] T: ?Sized, A: AllocRef> Drop for Box<T, A> {
739
739
}
740
740
741
741
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
742
- impl < T : Default , A : AllocRef + Default > Default for Box < T , A > {
742
+ impl < T : Default > Default for Box < T > {
743
743
/// Creates a `Box<T>`, with the `Default` value for T.
744
744
fn default ( ) -> Self {
745
745
box T :: default ( )
@@ -916,7 +916,7 @@ impl<T: ?Sized + Hasher, A: AllocRef> Hasher for Box<T, A> {
916
916
}
917
917
918
918
#[ stable( feature = "from_for_ptrs" , since = "1.6.0" ) ]
919
- impl < T , A : AllocRef + Default > From < T > for Box < T , A > {
919
+ impl < T > From < T > for Box < T > {
920
920
/// Converts a generic type `T` into a `Box<T>`
921
921
///
922
922
/// The conversion allocates on the heap and moves `t`
@@ -930,7 +930,7 @@ impl<T, A: AllocRef + Default> From<T> for Box<T, A> {
930
930
/// assert_eq!(Box::from(x), boxed);
931
931
/// ```
932
932
fn from ( t : T ) -> Self {
933
- Box :: new_in ( t , A :: default ( ) )
933
+ Box :: new ( t )
934
934
}
935
935
}
936
936
@@ -945,7 +945,7 @@ impl<T: ?Sized, A: AllocRef> From<Box<T, A>> for Pin<Box<T, A>> {
945
945
}
946
946
947
947
#[ stable( feature = "box_from_slice" , since = "1.17.0" ) ]
948
- impl < T : Copy , A : AllocRef + Default > From < & [ T ] > for Box < [ T ] , A > {
948
+ impl < T : Copy > From < & [ T ] > for Box < [ T ] > {
949
949
/// Converts a `&[T]` into a `Box<[T]>`
950
950
///
951
951
/// This conversion allocates on the heap
@@ -970,7 +970,7 @@ impl<T: Copy, A: AllocRef + Default> From<&[T]> for Box<[T], A> {
970
970
}
971
971
972
972
#[ stable( feature = "box_from_slice" , since = "1.17.0" ) ]
973
- impl < A : AllocRef + Default > From < & str > for Box < str , A > {
973
+ impl From < & str > for Box < str > {
974
974
/// Converts a `&str` into a `Box<str>`
975
975
///
976
976
/// This conversion allocates on the heap
@@ -1237,9 +1237,9 @@ impl<I> FromIterator<I> for Box<[I]> {
1237
1237
}
1238
1238
1239
1239
#[ stable( feature = "box_slice_clone" , since = "1.3.0" ) ]
1240
- impl < T : Clone , A : AllocRef + Clone > Clone for Box < [ T ] , A > {
1240
+ impl < T : Clone > Clone for Box < [ T ] > {
1241
1241
fn clone ( & self ) -> Self {
1242
- self . to_vec_in ( self . 1 . clone ( ) ) . into_boxed_slice ( )
1242
+ self . to_vec ( ) . into_boxed_slice ( )
1243
1243
}
1244
1244
}
1245
1245
0 commit comments