Skip to content

Commit b8d39e1

Browse files
authored
Rollup merge of rust-lang#77709 - pickfire:patch-1, r=jyn514
Link Vec leak doc to Box
2 parents 094c25a + 8688fa8 commit b8d39e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: library/alloc/src/vec.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,8 @@ impl<T> Vec<T> {
14761476
/// `'a`. If the type has only static references, or none at all, then this
14771477
/// may be chosen to be `'static`.
14781478
///
1479-
/// This function is similar to the `leak` function on `Box`.
1479+
/// This function is similar to the [`leak`][Box::leak] function on [`Box`]
1480+
/// except that there is no way to recover the leaked memory.
14801481
///
14811482
/// This function is mainly useful for data that lives for the remainder of
14821483
/// the program's life. Dropping the returned reference will cause a memory

0 commit comments

Comments
 (0)