]> git.lizzy.rs Git - rust.git/blobdiff - src/liballoc/string.rs
Rollup merge of #61453 - lzutao:nouse-featuregate-integer_atomics, r=sfackler
[rust.git] / src / liballoc / string.rs
index 3fdcf95ccaa3f7a375e53c92a5b73a2823a6af46..7f7722548f581df43deca22d09a91d2950158911 100644 (file)
@@ -2189,6 +2189,14 @@ fn from(s: &str) -> String {
     }
 }
 
+#[stable(feature = "from_ref_string", since = "1.35.0")]
+impl From<&String> for String {
+    #[inline]
+    fn from(s: &String) -> String {
+        s.clone()
+    }
+}
+
 // note: test pulls in libstd, which causes errors here
 #[cfg(not(test))]
 #[stable(feature = "string_from_box", since = "1.18.0")]