1
Fork 0

std: Deprecate std::old_io::fs

This commit deprecates the majority of std::old_io::fs in favor of std::fs and
its new functionality. Some functions remain non-deprecated but are now behind a
feature gate called `old_fs`. These functions will be deprecated once
suitable replacements have been implemented.

The compiler has been migrated to new `std::fs` and `std::path` APIs where
appropriate as part of this change.
This commit is contained in:
Alex Crichton 2015-02-26 21:00:43 -08:00
parent 3b3bb0e682
commit 95d904625b
80 changed files with 1430 additions and 1209 deletions

View file

@ -49,7 +49,7 @@ use rustc::middle::stability;
use std::rc::Rc;
use std::u32;
use std::old_path::Path as FsPath; // Conflicts with Path struct
use std::path::PathBuf;
use core::DocContext;
use doctree;
@ -118,7 +118,7 @@ impl<T: Clean<U>, U> Clean<Vec<U>> for syntax::owned_slice::OwnedSlice<T> {
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
pub struct Crate {
pub name: String,
pub src: FsPath,
pub src: PathBuf,
pub module: Option<Item>,
pub externs: Vec<(ast::CrateNum, ExternalCrate)>,
pub primitives: Vec<PrimitiveType>,
@ -191,7 +191,7 @@ impl<'a, 'tcx> Clean<Crate> for visit_ast::RustdocVisitor<'a, 'tcx> {
let src = match cx.input {
Input::File(ref path) => path.clone(),
Input::Str(_) => FsPath::new("") // FIXME: this is wrong
Input::Str(_) => PathBuf::new("") // FIXME: this is wrong
};
Crate {