Skip to content

Commit bf4e77d

Browse files
committed
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!
1 parent dabf0c6 commit bf4e77d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+60
-22827
lines changed

src/librand/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,13 @@
2424
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2525
html_root_url = "http://doc.rust-lang.org/nightly/",
2626
html_playground_url = "http://play.rust-lang.org/")]
27-
#![feature(no_std)]
2827
#![no_std]
29-
#![unstable(feature = "rand")]
30-
#![feature(staged_api)]
3128
#![staged_api]
29+
#![unstable(feature = "rand")]
3230
#![feature(core)]
31+
#![feature(no_std)]
32+
#![feature(staged_api)]
3333
#![feature(step_by)]
34-
#![deprecated(reason = "use the crates.io `rand` library instead",
35-
since = "1.0.0-alpha")]
3634

3735
#![cfg_attr(test, feature(test, rand, rustc_private))]
3836

src/libserialize/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Core encoding and decoding interfaces.
3030
#![feature(box_syntax)]
3131
#![feature(collections)]
3232
#![feature(core)]
33-
#![feature(old_path)]
3433
#![feature(rustc_private)]
3534
#![feature(staged_api)]
3635
#![feature(std_misc)]

src/libserialize/serialize.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
Core encoding and decoding interfaces.
1515
*/
1616

17-
#[allow(deprecated)]
18-
use std::old_path::{self, GenericPath};
1917
use std::path;
2018
use std::rc::Rc;
2119
use std::cell::{Cell, RefCell};
@@ -540,36 +538,6 @@ macro_rules! tuple {
540538

541539
tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, }
542540

543-
#[allow(deprecated)]
544-
impl Encodable for old_path::posix::Path {
545-
fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
546-
self.as_vec().encode(e)
547-
}
548-
}
549-
550-
#[allow(deprecated)]
551-
impl Decodable for old_path::posix::Path {
552-
fn decode<D: Decoder>(d: &mut D) -> Result<old_path::posix::Path, D::Error> {
553-
let bytes: Vec<u8> = try!(Decodable::decode(d));
554-
Ok(old_path::posix::Path::new(bytes))
555-
}
556-
}
557-
558-
#[allow(deprecated)]
559-
impl Encodable for old_path::windows::Path {
560-
fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
561-
self.as_vec().encode(e)
562-
}
563-
}
564-
565-
#[allow(deprecated)]
566-
impl Decodable for old_path::windows::Path {
567-
fn decode<D: Decoder>(d: &mut D) -> Result<old_path::windows::Path, D::Error> {
568-
let bytes: Vec<u8> = try!(Decodable::decode(d));
569-
Ok(old_path::windows::Path::new(bytes))
570-
}
571-
}
572-
573541
impl Encodable for path::PathBuf {
574542
fn encode<S: Encoder>(&self, e: &mut S) -> Result<(), S::Error> {
575543
self.to_str().unwrap().encode(e)

src/libstd/ffi/c_str.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ use io;
1818
use iter::Iterator;
1919
use libc;
2020
use mem;
21-
#[allow(deprecated)]
22-
use old_io;
2321
use ops::Deref;
2422
use option::Option::{self, Some, None};
2523
use result::Result::{self, Ok, Err};
@@ -245,18 +243,6 @@ impl From<NulError> for io::Error {
245243
}
246244
}
247245

248-
#[stable(feature = "rust1", since = "1.0.0")]
249-
#[allow(deprecated)]
250-
impl From<NulError> for old_io::IoError {
251-
fn from(_: NulError) -> old_io::IoError {
252-
old_io::IoError {
253-
kind: old_io::IoErrorKind::InvalidInput,
254-
desc: "data provided contains a nul byte",
255-
detail: None
256-
}
257-
}
258-
}
259-
260246
impl CStr {
261247
/// Cast a raw C string to a safe C string wrapper.
262248
///

src/libstd/ffi/os_str.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ use string::String;
4242
use ops;
4343
use cmp;
4444
use hash::{Hash, Hasher};
45-
use old_path::{Path, GenericPath};
4645
use vec::Vec;
4746

4847
use sys::os_str::{Buf, Slice};
@@ -447,21 +446,6 @@ impl AsRef<OsStr> for String {
447446
}
448447
}
449448

450-
#[allow(deprecated)]
451-
#[stable(feature = "rust1", since = "1.0.0")]
452-
#[deprecated(since = "1.0.0", reason = "trait is deprecated")]
453-
impl AsOsStr for Path {
454-
#[cfg(unix)]
455-
fn as_os_str(&self) -> &OsStr {
456-
unsafe { mem::transmute(self.as_vec()) }
457-
}
458-
#[cfg(windows)]
459-
fn as_os_str(&self) -> &OsStr {
460-
// currently .as_str() is actually infallible on windows
461-
OsStr::from_str(self.as_str().unwrap())
462-
}
463-
}
464-
465449
impl FromInner<Buf> for OsString {
466450
fn from_inner(buf: Buf) -> OsString {
467451
OsString { inner: buf }

src/libstd/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,9 @@ pub mod ffi;
262262
pub mod fs;
263263
pub mod io;
264264
pub mod net;
265-
pub mod old_io;
266-
pub mod old_path;
267265
pub mod os;
268266
pub mod path;
269267
pub mod process;
270-
pub mod rand;
271268
pub mod sync;
272269
pub mod time;
273270

@@ -281,6 +278,7 @@ pub mod time;
281278

282279
pub mod rt;
283280
mod panicking;
281+
mod rand;
284282

285283
// Modules that exist purely to document + host impl docs for primitive types
286284

@@ -297,8 +295,6 @@ mod std {
297295
pub use sync; // used for select!()
298296
pub use error; // used for try!()
299297
pub use fmt; // used for any formatting strings
300-
#[allow(deprecated)]
301-
pub use old_io; // used for println!()
302298
pub use option; // used for bitflags!{}
303299
pub use rt; // used for panic!()
304300
pub use vec; // used for vec![]

0 commit comments

Comments
 (0)