about summary refs log tree commit diff
path: root/library/alloc/src/string.rs
diff options
context:
space:
mode:
authorozkanonur <work@onurozkan.dev>2023-05-07 00:12:29 +0300
committerozkanonur <work@onurozkan.dev>2023-05-07 00:12:29 +0300
commit4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed (patch)
treefa8a777bab81cc492a0df4d8bd6d40efc17d2ae4 /library/alloc/src/string.rs
parent8b8110e1469d459a196f6feb60d82dec48c3cfc2 (diff)
downloadrust-4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed.tar.gz
rust-4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed.zip
enable `rust_2018_idioms` for doctests
Signed-off-by: ozkanonur <work@onurozkan.dev>
Diffstat (limited to 'library/alloc/src/string.rs')
-rw-r--r--library/alloc/src/string.rs2
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");