rust-lang / wg-allocators

Home of the Allocators working group: Paving a path for a standard set of allocator traits to be used in collections!
http://bit.ly/hello-wg-allocators
203 stars 9 forks source link

Allocator doesn't seem to be implemented for Arc<A> #84

Closed lachlansneff closed 3 years ago

lachlansneff commented 3 years ago

This has obvious usecases.

impl<A: Allocator + ?Sized, B: Allocator> Allocator for Arc<A, B> {
    ...
}
TimDiekmann commented 3 years ago

This was already proposed in https://github.com/rust-lang/wg-allocators/issues/54, however the Rc and Arc part were removed as the allocator had to be mutable. I changed back the proposal to include it again. Adding a parameter to Arc is tracked in #7.