Skip to content

Commit de35b66

Browse files
committed
Document Box::into_raw returns non-null ptr
1 parent 4d5ef32 commit de35b66

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/liballoc/boxed.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ impl<T: ?Sized> Box<T> {
126126
Box(Unique::new_unchecked(raw))
127127
}
128128

129-
/// Consumes the `Box`, returning the wrapped raw pointer.
129+
/// Consumes the `Box`, returning a wrapped raw pointer.
130+
///
131+
/// The pointer will be properly aligned and non-null.
130132
///
131133
/// After calling this function, the caller is responsible for the
132134
/// memory previously managed by the `Box`. In particular, the

0 commit comments

Comments
 (0)