Skip to content

Commit a5494a8

Browse files
committed
fix doc for missing Box allocator consistency
1 parent 62b13a9 commit a5494a8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: library/alloc/src/boxed.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,8 @@ impl<T: ?Sized> Box<T> {
10451045
/// memory problems. For example, a double-free may occur if the
10461046
/// function is called twice on the same raw pointer.
10471047
///
1048+
/// The raw pointer must point to a block of memory allocated by the global allocator.
1049+
///
10481050
/// The safety conditions are described in the [memory layout] section.
10491051
///
10501052
/// # Examples
@@ -1148,6 +1150,7 @@ impl<T: ?Sized, A: Allocator> Box<T, A> {
11481150
/// memory problems. For example, a double-free may occur if the
11491151
/// function is called twice on the same raw pointer.
11501152
///
1153+
/// The raw pointer must point to a block of memory allocated by `alloc`
11511154
///
11521155
/// # Examples
11531156
///

0 commit comments

Comments
 (0)