about summary refs log tree commit diff
path: root/src/liballoc/string.rs
diff options
context:
space:
mode:
authorMark Simulacrum <mark.simulacrum@gmail.com>2017-07-04 07:41:33 -0600
committerGitHub <noreply@github.com>2017-07-04 07:41:33 -0600
commit32cbbffea2ebf4bb222b54bd67e1a4e54c1ca3c5 (patch)
treefb259084358c1ca157812e4f338378951bf3f65c /src/liballoc/string.rs
parent7a75d2bec402b76688da35402575aa7d8e61d91c (diff)
parent0d885efe16899c2dbad2918345c9ede7b83caa7f (diff)
downloadrust-32cbbffea2ebf4bb222b54bd67e1a4e54c1ca3c5.tar.gz
rust-32cbbffea2ebf4bb222b54bd67e1a4e54c1ca3c5.zip
Rollup merge of #42227 - ollie27:into_to_from, r=aturon
Convert Intos to Froms.

This is a resubmission of #42129 without `impl<T> From<Vec<T>> for Box<[T]>`.
Diffstat (limited to 'src/liballoc/string.rs')
-rw-r--r--src/liballoc/string.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs
index 79d1ccf637d..622cc68964b 100644
--- a/src/liballoc/string.rs
+++ b/src/liballoc/string.rs
@@ -2008,10 +2008,10 @@ impl From<Box<str>> for String {
     }
 }
 
-#[stable(feature = "box_from_str", since = "1.18.0")]
-impl Into<Box<str>> for String {
-    fn into(self) -> Box<str> {
-        self.into_boxed_str()
+#[stable(feature = "box_from_str", since = "1.20.0")]
+impl From<String> for Box<str> {
+    fn from(s: String) -> Box<str> {
+        s.into_boxed_str()
     }
 }