Closed
Description
Most (all?) of the structs mentioned in #7 only needs the dealloc
method for Drop
. It'd may be useful to split up Alloc
into two traits. We didn't came up however with the exact layout and relationship with those two traits. So far, those possibilities showed up:
- Make it a supertrait:
trait Alloc: Dealloc { ... }
(Separatedealloc
fromAlloc
into other trait #9 (comment)) Associate theAlloc
trait:trait Dealloc { type Alloc: Alloc; ... }
- Introduce a trait
trait GetDealloc { unsafe fn get_dealloc() -> ???; }
- Same as above, but
get_alloc
as method inAlloc
instead of an extra trait (Separatedealloc
fromAlloc
into other trait #9 (comment)) - Also split
realloc
intoRealloc
and associateDealloc
withAlloc
andRealloc
(Separatedealloc
fromAlloc
into other trait #9 (comment))- Also associate
Alloc
withRealloc
(Separatedealloc
fromAlloc
into other trait #9 (comment))
- Also associate
- Even more complicated hierarchies (Separate
dealloc
fromAlloc
into other trait #9 (comment))
Edits
- 2019/Oct/05: Reflect the threads current solution proposals.