about summary refs log tree commit diff
path: root/library/alloc/src/string.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2023-05-10 08:31:30 +0200
committerRalf Jung <post@ralfj.de>2023-05-10 08:31:30 +0200
commitefa68d02d2ee74f7b70703caef44ff53b92fe910 (patch)
tree082e0bc9195c513423a06ef48bb1825f2c2feb97 /library/alloc/src/string.rs
parent53801d3f085f8b635f0e0f668584c1d618cb1d9d (diff)
parent65dfca8488d635552eb246eb8e15df646e987cff (diff)
downloadrust-efa68d02d2ee74f7b70703caef44ff53b92fe910.tar.gz
rust-efa68d02d2ee74f7b70703caef44ff53b92fe910.zip
Merge from rustc
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 b9ef76c109a..088139a6907 100644
--- a/library/alloc/src/string.rs
+++ b/library/alloc/src/string.rs
@@ -2741,7 +2741,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");