From bf4e77d4b543632ca4df8fdd7092850dffc3954b Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 9 Apr 2015 17:42:22 -0700 Subject: std: Remove old_io/old_path/rand modules This commit entirely removes the old I/O, path, and rand modules. All functionality has been deprecated and unstable for quite some time now! --- src/libstd/ffi/c_str.rs | 14 -------------- src/libstd/ffi/os_str.rs | 16 ---------------- 2 files changed, 30 deletions(-) (limited to 'src/libstd/ffi') diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index de91e5f3268..d510ee48a16 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -18,8 +18,6 @@ use io; use iter::Iterator; use libc; use mem; -#[allow(deprecated)] -use old_io; use ops::Deref; use option::Option::{self, Some, None}; use result::Result::{self, Ok, Err}; @@ -245,18 +243,6 @@ impl From for io::Error { } } -#[stable(feature = "rust1", since = "1.0.0")] -#[allow(deprecated)] -impl From for old_io::IoError { - fn from(_: NulError) -> old_io::IoError { - old_io::IoError { - kind: old_io::IoErrorKind::InvalidInput, - desc: "data provided contains a nul byte", - detail: None - } - } -} - impl CStr { /// Cast a raw C string to a safe C string wrapper. /// diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index ab20efe25eb..cc2ba265cd7 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -42,7 +42,6 @@ use string::String; use ops; use cmp; use hash::{Hash, Hasher}; -use old_path::{Path, GenericPath}; use vec::Vec; use sys::os_str::{Buf, Slice}; @@ -447,21 +446,6 @@ impl AsRef for String { } } -#[allow(deprecated)] -#[stable(feature = "rust1", since = "1.0.0")] -#[deprecated(since = "1.0.0", reason = "trait is deprecated")] -impl AsOsStr for Path { - #[cfg(unix)] - fn as_os_str(&self) -> &OsStr { - unsafe { mem::transmute(self.as_vec()) } - } - #[cfg(windows)] - fn as_os_str(&self) -> &OsStr { - // currently .as_str() is actually infallible on windows - OsStr::from_str(self.as_str().unwrap()) - } -} - impl FromInner for OsString { fn from_inner(buf: Buf) -> OsString { OsString { inner: buf } -- cgit 1.4.1-3-g733a5