Skip to content

Commit 2f80444

Browse files
committed
Remove innapropriate string mutability section.
Fixes #14948
1 parent 776c17f commit 2f80444

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/libcollections/str.rs

-11
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,6 @@ the string is valid for the `'static` lifetime, otherwise known as the
4444
lifetime of the entire program. As can be inferred from the type, these static
4545
strings are not mutable.
4646
47-
# Mutability
48-
49-
Many languages have immutable strings by default, and Rust has a particular
50-
flavor on this idea. As with the rest of Rust types, strings are immutable by
51-
default. If a string is declared as `mut`, however, it may be mutated. This
52-
works the same way as the rest of Rust's type system in the sense that if
53-
there's a mutable reference to a string, there may only be one mutable reference
54-
to that string. With these guarantees, strings can easily transition between
55-
being mutable/immutable with the same benefits of having mutable strings in
56-
other languages.
57-
5847
# Representation
5948
6049
Rust's string type, `str`, is a sequence of unicode scalar values encoded as a

0 commit comments

Comments
 (0)