diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2014-08-18 14:00:31 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2014-08-18 14:00:35 -0400 |
| commit | 2f8044418ef6102a94d09f4da9004a01de1dddf5 (patch) | |
| tree | 2d365197ecdc31107a37fb38f22007e0ec4d19c7 | |
| parent | 776c17f476c4be92f6cfe4dab528886973ea8c03 (diff) | |
| download | rust-2f8044418ef6102a94d09f4da9004a01de1dddf5.tar.gz rust-2f8044418ef6102a94d09f4da9004a01de1dddf5.zip | |
Remove innapropriate string mutability section.
Fixes #14948
| -rw-r--r-- | src/libcollections/str.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index b2be9662110..9ca1011f166 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -44,17 +44,6 @@ the string is valid for the `'static` lifetime, otherwise known as the lifetime of the entire program. As can be inferred from the type, these static strings are not mutable. -# Mutability - -Many languages have immutable strings by default, and Rust has a particular -flavor on this idea. As with the rest of Rust types, strings are immutable by -default. If a string is declared as `mut`, however, it may be mutated. This -works the same way as the rest of Rust's type system in the sense that if -there's a mutable reference to a string, there may only be one mutable reference -to that string. With these guarantees, strings can easily transition between -being mutable/immutable with the same benefits of having mutable strings in -other languages. - # Representation Rust's string type, `str`, is a sequence of unicode scalar values encoded as a |
