Skip to content

Commit

Permalink
fix doc for missing Box allocator consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
DiuDiu777 committed Jan 2, 2025
1 parent 62b13a9 commit a5494a8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,8 @@ impl<T: ?Sized> Box<T> {
/// memory problems. For example, a double-free may occur if the
/// function is called twice on the same raw pointer.
///
/// The raw pointer must point to a block of memory allocated by the global allocator.
///
/// The safety conditions are described in the [memory layout] section.
///
/// # Examples
Expand Down Expand Up @@ -1148,6 +1150,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
/// memory problems. For example, a double-free may occur if the
/// function is called twice on the same raw pointer.
///
/// The raw pointer must point to a block of memory allocated by `alloc`
///
/// # Examples
///
Expand Down

0 comments on commit a5494a8

Please sign in to comment.