3 ms·
Box is parameterized by an allocator: https://doc.rust-lang.org/stable/std/boxed/struct.Box.html https://doc.rust-lang.org/stable/std/boxed/struct.Box.html Rus
by steveklabnik 4y ago
Box is parameterized by an allocator: https://doc.rust-lang.org/stable/std/boxed/struct.Box.html https://doc.rust-lang.org/stable/std/boxed/struct.Box.html
Rust doesn’t let you utilize this fact on stable yet, which is what you’re thinking of, but the implementation in this case already exists.