fitzgen / bumpalo

A fast bump allocation arena for Rust
https://docs.rs/bumpalo
Apache License 2.0
1.42k stars 112 forks source link

Provide feature to use nightly allocator API #87

Closed NOBLES5E closed 3 years ago

NOBLES5E commented 3 years ago

In latest Rust nightly we can allocate with custom allocator (for example https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html#method.new_in).

It will be great for bumpalo to provide the ability to use this. To achieve this, the &Bump needs to implement std::alloc::AllocRef.

fitzgen commented 3 years ago

I am in favor of this, but I do not have time to implement it myself right now. Happy to review a PR.