From 408dc5ad1b657eb2261e7ac680b8d100469e5477 Mon Sep 17 00:00:00 2001 From: Kevin Ballard Date: Tue, 3 Dec 2013 19:15:12 -0800 Subject: Revert "libstd: Change `Path::new` to `Path::init`." This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs --- src/libextra/glob.rs | 6 +++--- src/libextra/terminfo/searcher.rs | 10 +++++----- src/libextra/test.rs | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'src/libextra') diff --git a/src/libextra/glob.rs b/src/libextra/glob.rs index 6ef3801a086..e398a10ecf1 100644 --- a/src/libextra/glob.rs +++ b/src/libextra/glob.rs @@ -90,7 +90,7 @@ pub fn glob_with(pattern: &str, options: MatchOptions) -> GlobIterator { // calculate root this way to handle volume-relative Windows paths correctly let mut root = os::getcwd(); - let pat_root = Path::init(pattern).root_path(); + let pat_root = Path::new(pattern).root_path(); if pat_root.is_some() { if check_windows_verbatim(pat_root.get_ref()) { // XXX: How do we want to handle verbatim paths? I'm inclined to return nothing, @@ -766,9 +766,9 @@ mod test { #[test] fn test_matches_path() { - // on windows, (Path::init("a/b").as_str().unwrap() == "a\\b"), so this + // on windows, (Path::new("a/b").as_str().unwrap() == "a\\b"), so this // tests that / and \ are considered equivalent on windows - assert!(Pattern::new("a/b").matches_path(&Path::init("a/b"))); + assert!(Pattern::new("a/b").matches_path(&Path::new("a/b"))); } } diff --git a/src/libextra/terminfo/searcher.rs b/src/libextra/terminfo/searcher.rs index c83414b44c6..09f8cc0efef 100644 --- a/src/libextra/terminfo/searcher.rs +++ b/src/libextra/terminfo/searcher.rs @@ -29,7 +29,7 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> { // Find search directory match getenv("TERMINFO") { - Some(dir) => dirs_to_search.push(Path::init(dir)), + Some(dir) => dirs_to_search.push(Path::new(dir)), None => { if homedir.is_some() { // ncurses compatability; @@ -38,17 +38,17 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> { match getenv("TERMINFO_DIRS") { Some(dirs) => for i in dirs.split(':') { if i == "" { - dirs_to_search.push(Path::init("/usr/share/terminfo")); + dirs_to_search.push(Path::new("/usr/share/terminfo")); } else { - dirs_to_search.push(Path::init(i.to_owned())); + dirs_to_search.push(Path::new(i.to_owned())); } }, // Found nothing, use the default paths // /usr/share/terminfo is the de facto location, but it seems // Ubuntu puts it in /lib/terminfo None => { - dirs_to_search.push(Path::init("/usr/share/terminfo")); - dirs_to_search.push(Path::init("/lib/terminfo")); + dirs_to_search.push(Path::new("/usr/share/terminfo")); + dirs_to_search.push(Path::new("/lib/terminfo")); } } } diff --git a/src/libextra/test.rs b/src/libextra/test.rs index 93ffb8f9fde..7d6fd81c614 100644 --- a/src/libextra/test.rs +++ b/src/libextra/test.rs @@ -276,20 +276,20 @@ pub fn parse_opts(args: &[~str]) -> Option { let run_ignored = matches.opt_present("ignored"); let logfile = matches.opt_str("logfile"); - let logfile = logfile.map(|s| Path::init(s)); + let logfile = logfile.map(|s| Path::new(s)); let run_benchmarks = matches.opt_present("bench"); let run_tests = ! run_benchmarks || matches.opt_present("test"); let ratchet_metrics = matches.opt_str("ratchet-metrics"); - let ratchet_metrics = ratchet_metrics.map(|s| Path::init(s)); + let ratchet_metrics = ratchet_metrics.map(|s| Path::new(s)); let ratchet_noise_percent = matches.opt_str("ratchet-noise-percent"); let ratchet_noise_percent = ratchet_noise_percent.map(|s| from_str::(s).unwrap()); let save_metrics = matches.opt_str("save-metrics"); - let save_metrics = save_metrics.map(|s| Path::init(s)); + let save_metrics = save_metrics.map(|s| Path::new(s)); let test_shard = matches.opt_str("test-shard"); let test_shard = opt_shard(test_shard); -- cgit 1.4.1-3-g733a5