mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 00:53:48 +00:00
Auto merge of #123270 - JaniM:janim/string-alloc-doc, r=workingjubilee
doc: mention heap allocation earlier in String docs Just a tiny addition. Helps with #123263.
This commit is contained in:
commit
66de611196
@ -72,9 +72,9 @@ use crate::vec::Vec;
|
||||
|
||||
/// A UTF-8–encoded, growable string.
|
||||
///
|
||||
/// The `String` type is the most common string type that has ownership over the
|
||||
/// contents of the string. It has a close relationship with its borrowed
|
||||
/// counterpart, the primitive [`str`].
|
||||
/// `String` is the most common string type. It has ownership over the contents
|
||||
/// of the string, stored in a heap-allocated buffer (see [Representation](#representation)).
|
||||
/// It is closely related to its borrowed counterpart, the primitive [`str`].
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user