@@ -130,9 +130,9 @@ impl<T: ?Sized> Box<T> {
130
130
/// the destructor of `T` and free the allocated memory. For this
131
131
/// to be safe, the memory must have been allocated in the precise
132
132
/// way that `Box` expects, namely, using the global allocator
133
- /// with the correct [`Layout`] for holding a value of type `T`. In
133
+ /// with the correct [`Layout`] for holding a value of type `T`. In
134
134
/// particular, this will be satisfied for a pointer obtained
135
- /// from a previously existing `Box` using [`Box::into_raw`].
135
+ /// from a previously existing `Box` using [`Box::into_raw`].
136
136
///
137
137
/// # Safety
138
138
///
@@ -172,15 +172,15 @@ impl<T: ?Sized> Box<T> {
172
172
/// After calling this function, the caller is responsible for the
173
173
/// memory previously managed by the `Box`. In particular, the
174
174
/// caller should properly destroy `T` and release the memory. The
175
- /// easiest way to do so is to convert the raw pointer back into a `Box`
175
+ /// easiest way to do so is to convert the raw pointer back into a `Box`
176
176
/// with the [`Box::from_raw`] function.
177
177
///
178
178
/// Note: this is an associated function, which means that you have
179
179
/// to call it as `Box::into_raw(b)` instead of `b.into_raw()`. This
180
180
/// is so that there is no conflict with a method on the inner type.
181
181
///
182
182
/// # Examples
183
- /// Converting the raw pointer back into a `Box` with [`Box::from_raw`]
183
+ /// Converting the raw pointer back into a `Box` with [`Box::from_raw`]
184
184
/// for automatic cleanup:
185
185
/// ```
186
186
/// let x = Box::new(String::from("Hello"));
@@ -191,7 +191,7 @@ impl<T: ?Sized> Box<T> {
191
191
/// ```
192
192
/// use std::alloc::{Layout, dealloc};
193
193
/// use std::ptr;
194
- ///
194
+ ///
195
195
/// let x = Box::new(String::from("Hello"));
196
196
/// let p = Box::into_raw(x);
197
197
/// unsafe{ ptr::drop_in_place(p); }
0 commit comments