diff options
| author | Zack M. Davis <main@zackmdavis.net> | 2018-12-25 20:28:20 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2018-12-26 20:01:52 +0100 |
| commit | e7ce868f8e7ba2df728451bcbeafe387d393a1bc (patch) | |
| tree | 349805c4173c21772808e3793a885f39f2c4ac43 /src/libcore/str | |
| parent | 809a1a86e04d03619642ab9074b9c95a24cbf82b (diff) | |
| download | rust-e7ce868f8e7ba2df728451bcbeafe387d393a1bc.tar.gz rust-e7ce868f8e7ba2df728451bcbeafe387d393a1bc.zip | |
Update src/libcore/str/mod.rs, tweak must_use message
trimmed string is returned as a slice instead of a new allocation Co-Authored-By: matthiaskrgr <matthias.krueger@famsik.de>
Diffstat (limited to 'src/libcore/str')
| -rw-r--r-- | src/libcore/str/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index a8b8b44413e..9e724f117ff 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -3544,7 +3544,7 @@ impl str { /// /// assert_eq!("Hello\tworld", s.trim()); /// ``` - #[must_use = "this returns the trimmed string as a new allocation, \ + #[must_use = "this returns the trimmed string as a slice, \ without modifying the original"] #[stable(feature = "rust1", since = "1.0.0")] pub fn trim(&self) -> &str { |
