File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,12 @@ use crate::fmt;
2727use crate :: ptr:: { self , NonNull } ;
2828
2929// @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.
3036#[ unstable( feature = "global_co_alloc_meta" , issue = "none" ) ]
3137#[ allow( missing_debug_implementations) ]
3238#[ derive( Clone , Copy ) ]
@@ -84,6 +90,9 @@ pub type SliceAndMetaResult = Result<SliceAndMeta, AllocError>;
8490
8591#[ unstable( feature = "global_co_alloc" , issue = "none" ) ]
8692pub const fn co_alloc_metadata_num_slots < A : Allocator > ( ) -> usize {
93+ if true {
94+ panic ! ( "FIXME - consider removing co_alloc_metadata_num_slots()" ) ;
95+ }
8796 if A :: IS_CO_ALLOCATOR { 1 } else { 0 }
8897}
8998
You can’t perform that action at this time.
0 commit comments