From 4e7c14fe9f03dd0189f954bd9cb97c3c513e7eed Mon Sep 17 00:00:00 2001 From: ozkanonur Date: Sun, 7 May 2023 00:12:29 +0300 Subject: enable `rust_2018_idioms` for doctests Signed-off-by: ozkanonur --- library/alloc/src/string.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'library/alloc/src/string.rs') 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> for String { /// ``` /// # use std::borrow::Cow; /// // If the string is not owned... - /// let cow: Cow = 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"); -- cgit 1.4.1-3-g733a5