]> git.lizzy.rs Git - rust.git/commit
std: Move std::env to the new I/O APIs
authorAlex Crichton <alex@alexcrichton.com>
Mon, 23 Feb 2015 18:59:17 +0000 (10:59 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 24 Feb 2015 23:27:42 +0000 (15:27 -0800)
commit2d200c9c8bd6659720a68ab8dd74218b1e58c1e9
tree3dec2aac34e92d6c04d02c3897d0fb70dc21a6e4
parentf0f7ca27de6b4e03f30012656dad270cda55a363
std: Move std::env to the new I/O APIs

This commit moves `std::env` away from the `std::old_io` error type as well as
the `std::old_path` module. Methods returning an error now return `io::Error`
and methods consuming or returning paths use `std::path` instead of
`std::old_path`. This commit does not yet mark these APIs as `#[stable]`.

This commit also migrates `std::old_io::TempDir` to `std::fs::TempDir` with
essentially the exact same API. This type was added to interoperate with the new
path API and has its own `tempdir` feature.

Finally, this commit reverts the deprecation of `std::os` APIs returning the old
path API types. This deprecation can come back once the entire `std::old_path`
module is deprecated.

[breaking-change]
32 files changed:
src/librustc/lib.rs
src/librustc/metadata/filesearch.rs
src/librustc/plugin/load.rs
src/librustc/session/mod.rs
src/librustc_back/archive.rs
src/librustc_back/fs.rs
src/librustc_back/lib.rs
src/librustc_back/rpath.rs
src/librustc_back/target/mod.rs
src/librustc_driver/driver.rs
src/librustdoc/test.rs
src/libstd/dynamic_lib.rs
src/libstd/env.rs
src/libstd/fs.rs [deleted file]
src/libstd/fs/mod.rs [new file with mode: 0644]
src/libstd/fs/tempdir.rs [new file with mode: 0644]
src/libstd/net/test.rs
src/libstd/old_io/tempfile.rs
src/libstd/old_io/test.rs
src/libstd/os.rs
src/libstd/sys/unix/backtrace.rs
src/libstd/sys/unix/os.rs
src/libstd/sys/windows/fs.rs
src/libstd/sys/windows/mod.rs
src/libstd/sys/windows/os.rs
src/libstd/sys/windows/process2.rs
src/libterm/lib.rs
src/libterm/terminfo/searcher.rs
src/test/run-pass/env-home-dir.rs
src/test/run-pass/issue-15149.rs
src/test/run-pass/issue-16272.rs
src/test/run-pass/issue-20091.rs