Skip to content

Commit 9f0503e

Browse files
committed
Fix typo in docs of String::leak.
1 parent 5a0f454 commit 9f0503e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ impl String {
18511851
}
18521852

18531853
/// Consumes and leaks the `String`, returning a mutable reference to the contents,
1854-
/// `&'a mut str`.
1854+
/// `&'static mut str`.
18551855
///
18561856
/// This is mainly useful for data that lives for the remainder of
18571857
/// the program's life. Dropping the returned reference will cause a memory

0 commit comments

Comments
 (0)