From e7ce868f8e7ba2df728451bcbeafe387d393a1bc Mon Sep 17 00:00:00 2001 From: "Zack M. Davis" Date: Tue, 25 Dec 2018 20:28:20 +0100 Subject: 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 --- src/libcore/str/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libcore/str') 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 { -- cgit 1.4.1-3-g733a5