diff --git a/src/liballoc/string.rs b/src/liballoc/string.rs index 79d1ccf637d37..622cc68964bf7 100644 --- a/src/liballoc/string.rs +++ b/src/liballoc/string.rs @@ -2008,10 +2008,10 @@ impl From> for String { } } -#[stable(feature = "box_from_str", since = "1.18.0")] -impl Into> for String { - fn into(self) -> Box { - self.into_boxed_str() +#[stable(feature = "box_from_str", since = "1.20.0")] +impl From for Box { + fn from(s: String) -> Box { + s.into_boxed_str() } } diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index 1a91417ca0e92..5f0b11a616eb0 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -585,11 +585,11 @@ impl From> for CString { } } -#[stable(feature = "box_from_c_string", since = "1.18.0")] -impl Into> for CString { +#[stable(feature = "box_from_c_string", since = "1.20.0")] +impl From for Box { #[inline] - fn into(self) -> Box { - self.into_boxed_c_str() + fn from(s: CString) -> Box { + s.into_boxed_c_str() } } diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 42d641706a894..02a13ed7a5a03 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -540,10 +540,10 @@ impl From> for OsString { } } -#[stable(feature = "box_from_os_string", since = "1.18.0")] -impl Into> for OsString { - fn into(self) -> Box { - self.into_boxed_os_str() +#[stable(feature = "box_from_os_string", since = "1.20.0")] +impl From for Box { + fn from(s: OsString) -> Box { + s.into_boxed_os_str() } } diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 472ce6bc4fe9e..e7c7be981d25f 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1348,10 +1348,10 @@ impl From> for PathBuf { } } -#[stable(feature = "box_from_path_buf", since = "1.18.0")] -impl Into> for PathBuf { - fn into(self) -> Box { - self.into_boxed_path() +#[stable(feature = "box_from_path_buf", since = "1.20.0")] +impl From for Box { + fn from(p: PathBuf) -> Box { + p.into_boxed_path() } }