feat: new allocator features - #656
alejandro-vaz wants to merge 11 commits into
Conversation
|
well I think it makes more sense to invert the dependency dependencies of the two allocator ones and have the allocator-api2 as the default |
|
ah no, can't do that because the nightly one then will randomly download |
|
I've disabled one fuzzing operation because it magically failed to compile we have to remake fuzzing anyway so I'm not worried, see #657 |
|
I will fix the fuzzing stuff once #658 lands |
I've been able to get it to work by just exporting the macro from the pub use alloc::{
vec::Vec,
vec
};into pub use alloc::{
vec::{
self,
Vec
}
}; |
|
yeah that's exactly what I didn't want to do do we have any other alternative?? maybe #[rustfmt::skip]
pub use alloc::vec; |
|
Yeah I think that should work too. |
|
Does this PR mean you can only Given that the default would be |
|
that's a good point maybe by default we should disable all features and that's it honestly very few people use custom allocators yet anyway it'd also make CI simpler |
What did it complain about? |
|
actually I think it'll work now |
this PR revamps the allocator features
feature hierarchy
the allocator-api2 implies allocator-api, to make sure no weird case of both together when they should be disjoint exists
exported types
each of the three modes internally exports three types:
Global,VecandBoxwhich are then used in the rest of the API
that means that all conversions only happen to and from those types, not others
this is relevant to #649, though allocator-handling is a bit fucked up in the base case, so I'm not sure if it'd be easy to handle it there. and it unblocks #644
closes #655
closes #631
note: there is a regression in
from_elembecause I couldn't use thevecmacro anymore without doing macro wizardry, so it now uses iterators again