docs(allocator): document behaviour of Box

This commit is contained in:
Boshen 2024-01-29 21:34:45 +08:00
parent a647a47a3c
commit a1271af5df
No known key found for this signature in database
GPG key ID: 234DA6A7079C6801

View file

@ -14,7 +14,9 @@ use serde::{ser::SerializeSeq, Serialize, Serializer};
use crate::Allocator;
/// Bumpalo Box
/// A Box without Drop.
/// This is used for over coming self-referential structs.
/// It is a memory leak if the boxed value has a `Drop` implementation.
pub struct Box<'alloc, T: ?Sized>(pub &'alloc mut T);
impl<'alloc, T> Box<'alloc, T> {