Skip to content

Commit e091ba3

Browse files
committed
std: Remove deprecated AsPath trait
1 parent 69ded69 commit e091ba3

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

src/libstd/path.rs

-32
Original file line numberDiff line numberDiff line change
@@ -1184,14 +1184,6 @@ impl AsRef<OsStr> for PathBuf {
11841184
}
11851185
}
11861186

1187-
#[stable(feature = "rust1", since = "1.0.0")]
1188-
#[deprecated(since = "1.0.0", reason = "trait is deprecated")]
1189-
impl AsOsStr for PathBuf {
1190-
fn as_os_str(&self) -> &OsStr {
1191-
&self.inner[..]
1192-
}
1193-
}
1194-
11951187
#[stable(feature = "rust1", since = "1.0.0")]
11961188
impl Into<OsString> for PathBuf {
11971189
fn into(self) -> OsString {
@@ -1652,14 +1644,6 @@ impl AsRef<OsStr> for Path {
16521644
}
16531645
}
16541646

1655-
#[stable(feature = "rust1", since = "1.0.0")]
1656-
#[deprecated(since = "1.0.0", reason = "trait is deprecated")]
1657-
impl AsOsStr for Path {
1658-
fn as_os_str(&self) -> &OsStr {
1659-
&self.inner
1660-
}
1661-
}
1662-
16631647
#[stable(feature = "rust1", since = "1.0.0")]
16641648
impl fmt::Debug for Path {
16651649
fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> {
@@ -1711,22 +1695,6 @@ impl cmp::Ord for Path {
17111695
}
17121696
}
17131697

1714-
/// Freely convertible to a `Path`.
1715-
#[unstable(feature = "std_misc")]
1716-
#[deprecated(since = "1.0.0", reason = "use std::convert::AsRef<Path> instead")]
1717-
pub trait AsPath {
1718-
/// Converts to a `Path`.
1719-
#[unstable(feature = "std_misc")]
1720-
fn as_path(&self) -> &Path;
1721-
}
1722-
1723-
#[unstable(feature = "std_misc")]
1724-
#[deprecated(since = "1.0.0", reason = "use std::convert::AsRef<Path> instead")]
1725-
#[allow(deprecated)]
1726-
impl<T: AsOsStr + ?Sized> AsPath for T {
1727-
fn as_path(&self) -> &Path { Path::new(self.as_os_str()) }
1728-
}
1729-
17301698
#[stable(feature = "rust1", since = "1.0.0")]
17311699
impl AsRef<Path> for Path {
17321700
fn as_ref(&self) -> &Path { self }

0 commit comments

Comments
 (0)