diff options
Diffstat (limited to 'library/alloc/src/string.rs')
| -rw-r--r-- | library/alloc/src/string.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/alloc/src/string.rs b/library/alloc/src/string.rs index 01fe950cf3f..124230812df 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -900,7 +900,7 @@ impl String { /// let rebuilt = unsafe { String::from_raw_parts(ptr, len, cap) }; /// assert_eq!(rebuilt, "hello"); /// ``` - #[must_use = "`self` will be dropped if the result is not used"] + #[must_use = "losing the pointer will leak memory"] #[unstable(feature = "vec_into_raw_parts", reason = "new API", issue = "65816")] pub fn into_raw_parts(self) -> (*mut u8, usize, usize) { self.vec.into_raw_parts() |
