about summary refs log tree commit diff
path: root/src/libterm
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2015-02-25 10:29:39 +0530
committerManish Goregaokar <manishsmail@gmail.com>2015-02-25 10:29:39 +0530
commitb18584cbd942e2559e718d6318fdbc494e9047bd (patch)
tree3be7b8533626450b30f233f725a716546159090d /src/libterm
parent7b7cf84975fa9da0a301028b28be8b255f2fcd6f (diff)
parent2d200c9c8bd6659720a68ab8dd74218b1e58c1e9 (diff)
downloadrust-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/libterm')
-rw-r--r--src/libterm/lib.rs1
-rw-r--r--src/libterm/terminfo/searcher.rs3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libterm/lib.rs b/src/libterm/lib.rs
index 5418533aff1..823d2879236 100644
--- a/src/libterm/lib.rs
+++ b/src/libterm/lib.rs
@@ -60,6 +60,7 @@
 #![feature(unicode)]
 #![feature(std_misc)]
 #![feature(env)]
+#![feature(os)]
 #![cfg_attr(windows, feature(libc))]
 
 #[macro_use] extern crate log;
diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs
index c40a5534efb..a0cd7842070 100644
--- a/src/libterm/terminfo/searcher.rs
+++ b/src/libterm/terminfo/searcher.rs
@@ -17,12 +17,13 @@ use std::old_io::fs::PathExtensions;
 use std::env;
 
 /// Return path to database entry for `term`
+#[allow(deprecated)]
 pub fn get_dbpath_for_term(term: &str) -> Option<Box<Path>> {
     if term.len() == 0 {
         return None;
     }
 
-    let homedir = env::home_dir();
+    let homedir = ::std::os::homedir();
 
     let mut dirs_to_search = Vec::new();
     let first_char = term.char_at(0);