File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -244,12 +244,14 @@ impl<T: ?Sized> Box<T> {
244
244
/// the destructor of `T` and free the allocated memory. Since the
245
245
/// way `Box` allocates and releases memory is unspecified, the
246
246
/// only valid pointer to pass to this function is the one taken
247
- /// from another `Box` via the `Box::into_raw` function.
247
+ /// from another `Box` via the [ `Box::into_raw`] function.
248
248
///
249
249
/// This function is unsafe because improper use may lead to
250
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
///
253
+ /// [`Box::into_raw`]: struct.Box.html#method.into_raw
254
+ ///
253
255
/// # Examples
254
256
///
255
257
/// ```
@@ -269,12 +271,14 @@ impl<T: ?Sized> Box<T> {
269
271
/// memory previously managed by the `Box`. In particular, the
270
272
/// caller should properly destroy `T` and release the memory. The
271
273
/// proper way to do so is to convert the raw pointer back into a
272
- /// `Box` with the `Box::from_raw` function.
274
+ /// `Box` with the [ `Box::from_raw`] function.
273
275
///
274
276
/// Note: this is an associated function, which means that you have
275
277
/// to call it as `Box::into_raw(b)` instead of `b.into_raw()`. This
276
278
/// is so that there is no conflict with a method on the inner type.
277
279
///
280
+ /// [`Box::from_raw`]: struct.Box.html#method.from_raw
281
+ ///
278
282
/// # Examples
279
283
///
280
284
/// ```
You can’t perform that action at this time.
0 commit comments