Skip to content

Commit

Permalink
Rollup merge of #103412 - finnbear:fix_docs_typo_string_leak, r=thomcc
Browse files Browse the repository at this point in the history
Fix typo in docs of `String::leak`.

I introduced a typo in #103280, this PR fixes it.

See #103280 (comment)
  • Loading branch information
matthiaskrgr committed Oct 23, 2022
2 parents 441b950 + 9f0503e commit 25e02d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/alloc/src/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ impl String {
}

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

0 comments on commit 25e02d6

Please sign in to comment.