Skip to content

Commit 12874e3

Browse files
authored
Rollup merge of #103412 - finnbear:fix_docs_typo_string_leak, r=thomcc
Fix typo in docs of `String::leak`. I introduced a typo in #103280, this PR fixes it. See #103280 (comment)
2 parents 2d69c99 + 9f0503e commit 12874e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)