@@ -237,17 +237,17 @@ impl<T> Box<T> {
237
237
}
238
238
239
239
impl < T : ?Sized > Box < T > {
240
- /// Constructs a box from the raw pointer.
240
+ /// Constructs a box from a raw pointer.
241
241
///
242
- /// After this function call, pointer is owned by resulting box.
243
- /// In particular, it means that `Box` destructor calls destructor
244
- /// of `T` and releases memory. Since the way `Box` allocates and
245
- /// releases memory is unspecified, the only valid pointer to pass
246
- /// to this function is the one taken from another `Box` with
247
- /// `Box::into_raw` function.
242
+ /// After calling this function, the raw pointer is owned by the
243
+ /// resulting `Box`. Specifically, the `Box` destructor will call
244
+ /// the destructor of `T` and free the allocated memory. Since the
245
+ /// way `Box` allocates and releases memory is unspecified, the
246
+ /// only valid pointer to pass to this function is the one taken
247
+ /// from another `Box` via the `Box::into_raw` function.
248
248
///
249
- /// Function is unsafe, because improper use of this function may
250
- /// lead to memory problems like double-free, for example if the
249
+ /// This function is unsafe because improper use may lead to
250
+ /// memory problems. For example, a double-free may occur if the
251
251
/// function is called twice on the same raw pointer.
252
252
#[ stable( feature = "box_raw" , since = "1.4.0" ) ]
253
253
#[ inline]
@@ -257,11 +257,11 @@ impl<T: ?Sized> Box<T> {
257
257
258
258
/// Consumes the `Box`, returning the wrapped raw pointer.
259
259
///
260
- /// After call to this function, caller is responsible for the memory
261
- /// previously managed by `Box`, in particular caller should properly
262
- /// destroy `T` and release memory. The proper way to do it is to
263
- /// convert pointer back to `Box` with `Box::from_raw` function, because
264
- /// `Box` does not specify, how memory is allocated .
260
+ /// After calling this function, the caller is responsible for the
261
+ /// memory previously managed by the `Box`. In particular, the
262
+ /// caller should properly destroy `T` and release the memory. The
263
+ /// proper way to do so is to convert the raw pointer back into a
264
+ /// `Box` with the `Box::from_raw` function .
265
265
///
266
266
/// # Examples
267
267
///
0 commit comments