Skip to content

Commit

Permalink
doc: fix doc link in BumpAllocator
Browse files Browse the repository at this point in the history
  • Loading branch information
bluurryy committed Nov 3, 2024
1 parent 7972633 commit be1af2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bump_allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ use crate::{BaseAllocator, Bump, BumpScope, MinimumAlignment, SupportedMinimumAl

/// An allocator that allows `grow(_zeroed)`, `shrink` and `deallocate` calls with pointers that were not allocated by this allocator.
///
/// This trait is used for [`BumpBox::into_box`](BumpBox::into_box) to allow safely converting a `BumpBox` into a `Box`.
/// This trait is used for [`BumpBox::into_box`][into_box] to allow safely converting a `BumpBox` into a `Box`.
///
/// # Safety
/// - `grow(_zeroed)`, `shrink` and `deallocate` must be ok to be called with a pointer that was not allocated by this Allocator
///
/// [into_box]: crate::BumpBox::into_box
pub unsafe trait BumpAllocator: Allocator {}

unsafe impl<A: BumpAllocator> BumpAllocator for &A {}
Expand Down

0 comments on commit be1af2f

Please sign in to comment.