Skip to content

Commit 71a4bde

Browse files
authored
Rollup merge of rust-lang#36576 - GuillaumeGomez:box_urls, r=steveklabnik
Add missing urls for Box doc r? @steveklabnik
2 parents dcec48d + dfa0940 commit 71a4bde

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/liballoc/boxed.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,14 @@ impl<T: ?Sized> Box<T> {
244244
/// the destructor of `T` and free the allocated memory. Since the
245245
/// way `Box` allocates and releases memory is unspecified, the
246246
/// 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.
248248
///
249249
/// This function is unsafe because improper use may lead to
250250
/// memory problems. For example, a double-free may occur if the
251251
/// function is called twice on the same raw pointer.
252252
///
253+
/// [`Box::into_raw`]: struct.Box.html#method.into_raw
254+
///
253255
/// # Examples
254256
///
255257
/// ```
@@ -269,12 +271,14 @@ impl<T: ?Sized> Box<T> {
269271
/// memory previously managed by the `Box`. In particular, the
270272
/// caller should properly destroy `T` and release the memory. The
271273
/// 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.
273275
///
274276
/// Note: this is an associated function, which means that you have
275277
/// to call it as `Box::into_raw(b)` instead of `b.into_raw()`. This
276278
/// is so that there is no conflict with a method on the inner type.
277279
///
280+
/// [`Box::from_raw`]: struct.Box.html#method.from_raw
281+
///
278282
/// # Examples
279283
///
280284
/// ```

0 commit comments

Comments
 (0)