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 cf16a3424a0..4813422e160 100644 --- a/library/alloc/src/string.rs +++ b/library/alloc/src/string.rs @@ -2732,7 +2732,7 @@ impl<'a> From<Cow<'a, str>> for String { /// ``` /// # use std::borrow::Cow; /// // If the string is not owned... - /// let cow: Cow<str> = Cow::Borrowed("eggplant"); + /// let cow: Cow<'_, str> = Cow::Borrowed("eggplant"); /// // It will allocate on the heap and copy the string. /// let owned: String = String::from(cow); /// assert_eq!(&owned[..], "eggplant"); |
