diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 10:29:39 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 10:29:39 +0530 |
| commit | b18584cbd942e2559e718d6318fdbc494e9047bd (patch) | |
| tree | 3be7b8533626450b30f233f725a716546159090d /src/librustc_back/target | |
| parent | 7b7cf84975fa9da0a301028b28be8b255f2fcd6f (diff) | |
| parent | 2d200c9c8bd6659720a68ab8dd74218b1e58c1e9 (diff) | |
| download | rust-b18584cbd942e2559e718d6318fdbc494e9047bd.tar.gz rust-b18584cbd942e2559e718d6318fdbc494e9047bd.zip | |
Rollup merge of #22727 - alexcrichton:prep-env, r=aturon
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_back/target')
| -rw-r--r-- | src/librustc_back/target/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index b04c07977c3..d09a7c355d3 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -310,6 +310,7 @@ impl Target { /// JSON decoding. pub fn search(target: &str) -> Result<Target, String> { use std::env; + use std::os; use std::ffi::OsString; use std::old_io::File; use std::old_path::Path; @@ -396,7 +397,7 @@ impl Target { // FIXME 16351: add a sane default search path? - for dir in env::split_paths(&target_path) { + for dir in os::split_paths(target_path.to_str().unwrap()).iter() { let p = dir.join(path.clone()); if p.is_file() { return load_file(&p); |
