diff options
| author | Jani Mustonen <janijohannes@kapsi.fi> | 2024-04-01 00:04:57 +0300 |
|---|---|---|
| committer | Jani Mustonen <janijohannes@kapsi.fi> | 2024-04-01 00:04:57 +0300 |
| commit | 418535b798946b29c70a3ac4e33bbc6fbb4fb132 (patch) | |
| tree | fa75fcc3e18186fb8e898d1e6f2342847654b8b4 /library/alloc/src/string.rs | |
| parent | 688c30dc9f8434d63bddb65bd6a4d2258d19717c (diff) | |
| download | rust-418535b798946b29c70a3ac4e33bbc6fbb4fb132.tar.gz rust-418535b798946b29c70a3ac4e33bbc6fbb4fb132.zip | |
doc: mention heap allocation earlier in String docs
Just a tiny addition. Helps with #123263.
Diffstat (limited to 'library/alloc/src/string.rs')
| -rw-r--r-- | library/alloc/src/string.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 7464df268cc..5d552c8f15c 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -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 /// |
