From de35b66783278a16d2de35ddcc11b397be04c473 Mon Sep 17 00:00:00 2001 From: Evan Simmons Date: Fri, 17 Aug 2018 21:21:00 -0600 Subject: [PATCH] Document Box::into_raw returns non-null ptr --- src/liballoc/boxed.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 08db5136d040..105bf855013e 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -126,7 +126,9 @@ impl Box { Box(Unique::new_unchecked(raw)) } - /// Consumes the `Box`, returning the wrapped raw pointer. + /// Consumes the `Box`, returning a wrapped raw pointer. + /// + /// The pointer will be properly aligned and non-null. /// /// After calling this function, the caller is responsible for the /// memory previously managed by the `Box`. In particular, the