about summary refs log tree commit diff
path: root/src/librustc/plugin
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-02-23 10:59:17 -0800
committerAlex Crichton <alex@alexcrichton.com>2015-02-24 15:27:42 -0800
commit2d200c9c8bd6659720a68ab8dd74218b1e58c1e9 (patch)
tree3dec2aac34e92d6c04d02c3897d0fb70dc21a6e4 /src/librustc/plugin
parentf0f7ca27de6b4e03f30012656dad270cda55a363 (diff)
downloadrust-2d200c9c8bd6659720a68ab8dd74218b1e58c1e9.tar.gz
rust-2d200c9c8bd6659720a68ab8dd74218b1e58c1e9.zip
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]
Diffstat (limited to 'src/librustc/plugin')
-rw-r--r--src/librustc/plugin/load.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc/plugin/load.rs b/src/librustc/plugin/load.rs
index b3bc898748f..a419d4134b4 100644
--- a/src/librustc/plugin/load.rs
+++ b/src/librustc/plugin/load.rs
@@ -15,7 +15,7 @@ use metadata::creader::CrateReader;
 use plugin::registry::Registry;
 
 use std::mem;
-use std::env;
+use std::os;
 use std::dynamic_lib::DynamicLibrary;
 use std::borrow::ToOwned;
 use syntax::ast;
@@ -103,7 +103,7 @@ impl<'a> PluginLoader<'a> {
                         path: Path,
                         symbol: String) -> PluginRegistrarFun {
         // Make sure the path contains a / or the linker will search for it.
-        let path = env::current_dir().unwrap().join(&path);
+        let path = os::getcwd().unwrap().join(&path);
 
         let lib = match DynamicLibrary::open(Some(&path)) {
             Ok(lib) => lib,