File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -627,8 +627,17 @@ impl<T> [T] {
627
627
#[ rustc_allow_incoherent_impl]
628
628
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
629
629
#[ inline]
630
+ pub fn into_vec < A : Allocator > ( self : Box < Self , A > ) -> Vec < T , A > {
631
+ // N.B., see the `hack` module in this file for more details.
632
+ hack:: into_vec ( self )
633
+ }
634
+
635
+ /// Coallocation-aware version of [into_vec].
636
+ #[ rustc_allow_incoherent_impl]
637
+ #[ unstable( feature = "global_co_alloc" , issue = "none" ) ]
638
+ #[ inline]
630
639
#[ allow( unused_braces) ]
631
- pub fn into_vec < A : Allocator , const CO_ALLOC_PREF : CoAllocPref > (
640
+ pub fn into_vec_co < A : Allocator , const CO_ALLOC_PREF : CoAllocPref > (
632
641
self : Box < Self , A > ,
633
642
) -> Vec < T , A , CO_ALLOC_PREF >
634
643
where
Original file line number Diff line number Diff line change @@ -3510,7 +3510,7 @@ where
3510
3510
/// assert_eq!(Vec::from(b), vec![1, 2, 3]);
3511
3511
/// ```
3512
3512
fn from ( s : Box < [ T ] , A > ) -> Self {
3513
- s. into_vec ( )
3513
+ s. into_vec_co ( )
3514
3514
}
3515
3515
}
3516
3516
You can’t perform that action at this time.
0 commit comments