File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ use crate::fmt;
27
27
use crate :: ptr:: { self , NonNull } ;
28
28
29
29
// @FIXME Make this target-specific
30
+ /// Metadata for `Vec/VecDeque/RawVec` to assist the allocator. Make sure its
31
+ /// alignment is not bigger than alignment of `usize`. Otherwise, even if (a
32
+ /// particular) `Vec/VecDeque/RawVec` generic instance doesn't use cooperation,
33
+ /// it would increase size of that `Vec/VecDeque/RawVec` because of alignment
34
+ /// rules! @FIXME compile time test that `GlobalCoAllocMeta` alignment <=
35
+ /// `usize` alignment.
30
36
#[ unstable( feature = "global_co_alloc_meta" , issue = "none" ) ]
31
37
#[ allow( missing_debug_implementations) ]
32
38
#[ derive( Clone , Copy ) ]
@@ -84,6 +90,9 @@ pub type SliceAndMetaResult = Result<SliceAndMeta, AllocError>;
84
90
85
91
#[ unstable( feature = "global_co_alloc" , issue = "none" ) ]
86
92
pub const fn co_alloc_metadata_num_slots < A : Allocator > ( ) -> usize {
93
+ if true {
94
+ panic ! ( "FIXME - consider removing co_alloc_metadata_num_slots()" ) ;
95
+ }
87
96
if A :: IS_CO_ALLOCATOR { 1 } else { 0 }
88
97
}
89
98
You can’t perform that action at this time.
0 commit comments