Skip to content

Commit

Permalink
Rollup merge of rust-lang#103412 - finnbear:fix_docs_typo_string_leak…
Browse files Browse the repository at this point in the history
…, r=thomcc

Fix typo in docs of `String::leak`.

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

See rust-lang#103280 (comment)
  • Loading branch information
notriddle authored Oct 22, 2022
2 parents 8035bb8 + 9f0503e commit 65e0bd0
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 65e0bd0

Please sign in to comment.