Revert "libstd: Change Path::new to Path::init."

This reverts commit c54427ddfb.

Leave the #[ignores] in that were added to rustpkg tests.

Conflicts:
	src/librustc/driver/driver.rs
	src/librustc/metadata/creader.rs
This commit is contained in:
Kevin Ballard 2013-12-03 19:15:12 -08:00
parent bd5305fbc8
commit 408dc5ad1b
42 changed files with 543 additions and 544 deletions

View file

@ -56,12 +56,12 @@ pub fn new_default_context(c: workcache::Context, p: Path) -> BuildContext {
}
fn file_is_fresh(path: &str, in_hash: &str) -> bool {
let path = Path::init(path);
let path = Path::new(path);
path.exists() && in_hash == digest_file_with_date(&path)
}
fn binary_is_fresh(path: &str, in_hash: &str) -> bool {
let path = Path::init(path);
let path = Path::new(path);
path.exists() && in_hash == digest_only_date(&path)
}
@ -189,7 +189,7 @@ pub fn my_workspace(context: &Context, package_name: &str) -> Path {
let pkgid = PkgId::new(package_name);
let workspaces = pkg_parent_workspaces(context, &pkgid);
if workspaces.is_empty() {
bad_pkg_id.raise((Path::init(package_name), package_name.to_owned()));
bad_pkg_id.raise((Path::new(package_name), package_name.to_owned()));
}
workspaces[0]
}

View file

@ -483,7 +483,7 @@ impl CtxMethods for BuildContext {
})
});
// We always *run* the package script
let (cfgs, hook_result) = PkgScript::run_custom(&Path::init(pkg_exe), &sysroot);
let (cfgs, hook_result) = PkgScript::run_custom(&Path::new(pkg_exe), &sysroot);
debug!("Command return code = {:?}", hook_result);
if !hook_result.success() {
fail!("Error running custom build command")
@ -509,7 +509,7 @@ impl CtxMethods for BuildContext {
// Find crates inside the workspace
Everything => pkg_src.find_crates(),
// Find only tests
Tests => pkg_src.find_crates_with_filter(|s| { is_test(&Path::init(s)) }),
Tests => pkg_src.find_crates_with_filter(|s| { is_test(&Path::new(s)) }),
// Don't infer any crates -- just build the one that was requested
JustOne(ref p) => {
// We expect that p is relative to the package source's start directory,
@ -588,7 +588,7 @@ impl CtxMethods for BuildContext {
let result = self.install_no_build(pkg_src.build_workspace(),
build_inputs,
&pkg_src.destination_workspace,
&id).map(|s| Path::init(s.as_slice()));
&id).map(|s| Path::new(s.as_slice()));
installed_files = installed_files + result;
note(format!("Installed package {} to {}",
id.to_str(),
@ -709,10 +709,10 @@ impl CtxMethods for BuildContext {
}
fn init(&self) {
fs::mkdir_recursive(&Path::init("src"), io::UserRWX);
fs::mkdir_recursive(&Path::init("bin"), io::UserRWX);
fs::mkdir_recursive(&Path::init("lib"), io::UserRWX);
fs::mkdir_recursive(&Path::init("build"), io::UserRWX);
fs::mkdir_recursive(&Path::new("src"), io::UserRWX);
fs::mkdir_recursive(&Path::new("bin"), io::UserRWX);
fs::mkdir_recursive(&Path::new("lib"), io::UserRWX);
fs::mkdir_recursive(&Path::new("build"), io::UserRWX);
}
fn uninstall(&self, _id: &str, _vers: Option<~str>) {
@ -894,7 +894,7 @@ pub fn main_args(args: &[~str]) -> int {
let mut remaining_args: ~[~str] = remaining_args.map(|s| (*s).clone()).collect();
remaining_args.shift();
let sroot = match supplied_sysroot {
Some(s) => Path::init(s),
Some(s) => Path::new(s),
_ => filesearch::get_or_default_sysroot()
};

View file

@ -58,7 +58,7 @@ impl PkgId {
}
};
let path = Path::init(s);
let path = Path::new(s);
if !path.is_relative() {
return cond.raise((path, ~"absolute pkgid"));
}
@ -136,8 +136,8 @@ impl Iterator<(Path, Path)> for Prefixes {
let last = self.components.pop();
self.remaining.unshift(last);
// converting to str and then back is a little unfortunate
Some((Path::init(self.components.connect("/")),
Path::init(self.remaining.connect("/"))))
Some((Path::new(self.components.connect("/")),
Path::new(self.remaining.connect("/"))))
}
}
}

View file

@ -332,7 +332,7 @@ impl PkgSrc {
it.nth(prefix-1); // skip elements
}
assert!(it.peek().is_some());
let mut sub = Path::init(".");
let mut sub = Path::new(".");
for c in it {
sub.push(c);
}
@ -414,11 +414,11 @@ impl PkgSrc {
(k.clone(), p.as_str().unwrap().to_owned()));
prep.exec(proc(exec) {
for &(ref kind, ref p) in inputs.iter() {
let pth = Path::init(p.clone());
let pth = Path::new(p.clone());
exec.discover_input(*kind, *p, if *kind == ~"file" {
digest_file_with_date(&pth)
} else if *kind == ~"binary" {
digest_only_date(&Path::init(p.clone()))
digest_only_date(&Path::new(p.clone()))
} else {
fail!("Bad kind in build_crates")
});

View file

@ -64,7 +64,7 @@ fn fake_ctxt(sysroot: Path, workspace: &Path) -> BuildContext {
fn fake_pkg() -> PkgId {
let sn = ~"bogus";
PkgId {
path: Path::init(sn.as_slice()),
path: Path::new(sn.as_slice()),
short_name: sn,
version: NoVersion
}
@ -72,7 +72,7 @@ fn fake_pkg() -> PkgId {
fn git_repo_pkg() -> PkgId {
PkgId {
path: Path::init("mockgithub.com/catamorphism/test-pkg"),
path: Path::new("mockgithub.com/catamorphism/test-pkg"),
short_name: ~"test-pkg",
version: NoVersion
}
@ -80,7 +80,7 @@ fn git_repo_pkg() -> PkgId {
fn git_repo_pkg_with_tag(a_tag: ~str) -> PkgId {
PkgId {
path: Path::init("mockgithub.com/catamorphism/test-pkg"),
path: Path::new("mockgithub.com/catamorphism/test-pkg"),
short_name: ~"test-pkg",
version: Tagged(a_tag)
}
@ -480,7 +480,7 @@ fn command_line_test_output_with_env(args: &[~str], env: ~[(~str, ~str)]) -> ~[~
fn lib_output_file_name(workspace: &Path, short_name: &str) -> Path {
debug!("lib_output_file_name: given {} and short name {}",
workspace.display(), short_name);
library_in_workspace(&Path::init(short_name),
library_in_workspace(&Path::new(short_name),
short_name,
Build,
workspace,
@ -753,12 +753,12 @@ fn test_package_ids_must_be_relative_path_like() {
});
cond.trap(|(p, e)| {
let abs = os::make_absolute(&Path::init("foo/bar/quux"));
let abs = os::make_absolute(&Path::new("foo/bar/quux"));
assert_eq!(p, abs);
assert!("absolute pkgid" == e);
whatever.clone()
}).inside(|| {
let zp = os::make_absolute(&Path::init("foo/bar/quux"));
let zp = os::make_absolute(&Path::new("foo/bar/quux"));
// FIXME (#9639): This needs to handle non-utf8 paths
let z = PkgId::new(zp.as_str().unwrap());
assert_eq!(~"foo-0.1", z.to_str());
@ -769,7 +769,7 @@ fn test_package_ids_must_be_relative_path_like() {
#[test]
fn test_package_version() {
let local_path = "mockgithub.com/catamorphism/test_pkg_version";
let repo = init_git_repo(&Path::init(local_path));
let repo = init_git_repo(&Path::new(local_path));
let repo = repo.path();
let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test_pkg_version"]);
debug!("Writing files in: {}", repo_subdir.display());
@ -809,7 +809,7 @@ fn test_package_version() {
#[test]
fn test_package_request_version() {
let local_path = "mockgithub.com/catamorphism/test_pkg_version";
let repo = init_git_repo(&Path::init(local_path));
let repo = init_git_repo(&Path::new(local_path));
let repo = repo.path();
let repo_subdir = repo.join_many(["mockgithub.com", "catamorphism", "test_pkg_version"]);
debug!("Writing files in: {}", repo_subdir.display());
@ -828,7 +828,7 @@ fn test_package_request_version() {
command_line_test([~"install", format!("{}\\#0.3", local_path)], repo);
assert!(match installed_library_in_workspace(&Path::init("test_pkg_version"),
assert!(match installed_library_in_workspace(&Path::new("test_pkg_version"),
&repo.join(".rust")) {
Some(p) => {
debug!("installed: {}", p.display());
@ -842,7 +842,7 @@ fn test_package_request_version() {
== repo.join_many([".rust", "bin", "test_pkg_version"]));
let mut dir = target_build_dir(&repo.join(".rust"));
dir.push(&Path::init("src/mockgithub.com/catamorphism/test_pkg_version-0.3"));
dir.push(&Path::new("src/mockgithub.com/catamorphism/test_pkg_version-0.3"));
debug!("dir = {}", dir.display());
assert!(dir.is_dir());
assert!(dir.join("version-0.3-file.txt").exists());
@ -859,7 +859,7 @@ fn rustpkg_install_url_2() {
#[test]
fn rustpkg_library_target() {
let foo_repo = init_git_repo(&Path::init("foo"));
let foo_repo = init_git_repo(&Path::new("foo"));
let foo_repo = foo_repo.path();
let package_dir = foo_repo.join("foo");
@ -875,7 +875,7 @@ fn rustpkg_library_target() {
add_git_tag(&package_dir, ~"1.0");
command_line_test([~"install", ~"foo"], foo_repo);
assert_lib_exists(&foo_repo.join(".rust"), &Path::init("foo"), ExactRevision(~"1.0"));
assert_lib_exists(&foo_repo.join(".rust"), &Path::new("foo"), ExactRevision(~"1.0"));
}
#[test]
@ -893,12 +893,12 @@ fn package_script_with_default_build() {
debug!("dir = {}", dir.display());
let mut source = test_sysroot().dir_path();
source.pop(); source.pop();
let source = Path::init(file!()).dir_path().join_many(
let source = Path::new(file!()).dir_path().join_many(
[~"testsuite", ~"pass", ~"src", ~"fancy-lib", ~"pkg.rs"]);
debug!("package_script_with_default_build: {}", source.display());
fs::copy(&source, &dir.join_many(["src", "fancy-lib-0.1", "pkg.rs"]));
command_line_test([~"install", ~"fancy-lib"], dir);
assert_lib_exists(dir, &Path::init("fancy-lib"), NoVersion);
assert_lib_exists(dir, &Path::new("fancy-lib"), NoVersion);
assert!(target_build_dir(dir).join_many([~"fancy-lib", ~"generated.rs"]).exists());
let generated_path = target_build_dir(dir).join_many([~"fancy-lib", ~"generated.rs"]);
debug!("generated path = {}", generated_path.display());
@ -929,7 +929,7 @@ fn rustpkg_install_no_arg() {
"fn main() { let _x = (); }");
debug!("install_no_arg: dir = {}", package_dir.display());
command_line_test([~"install"], &package_dir);
assert_lib_exists(&tmp, &Path::init("foo"), NoVersion);
assert_lib_exists(&tmp, &Path::new("foo"), NoVersion);
}
#[test]
@ -952,7 +952,7 @@ fn rustpkg_clean_no_arg() {
#[test]
fn rust_path_test() {
let dir_for_path = TempDir::new("more_rust").expect("rust_path_test failed");
let dir = mk_workspace(dir_for_path.path(), &Path::init("foo"), &NoVersion);
let dir = mk_workspace(dir_for_path.path(), &Path::new("foo"), &NoVersion);
debug!("dir = {}", dir.display());
writeFile(&dir.join("main.rs"), "fn main() { let _x = (); }");
@ -993,9 +993,9 @@ fn rust_path_contents() {
fn rust_path_parse() {
os::setenv("RUST_PATH", "/a/b/c:/d/e/f:/g/h/i");
let paths = rust_path();
assert!(paths.contains(&Path::init("/g/h/i")));
assert!(paths.contains(&Path::init("/d/e/f")));
assert!(paths.contains(&Path::init("/a/b/c")));
assert!(paths.contains(&Path::new("/g/h/i")));
assert!(paths.contains(&Path::new("/d/e/f")));
assert!(paths.contains(&Path::new("/a/b/c")));
os::unsetenv("RUST_PATH");
}
@ -1375,8 +1375,8 @@ fn multiple_workspaces() {
// Copy the exact same package into directory B and install it
// Set the RUST_PATH to A:B
// Make a third package that uses foo, make sure we can build/install it
let (a_loc, _pkg_dir) = mk_temp_workspace(&Path::init("foo"), &NoVersion);
let (b_loc, _pkg_dir) = mk_temp_workspace(&Path::init("foo"), &NoVersion);
let (a_loc, _pkg_dir) = mk_temp_workspace(&Path::new("foo"), &NoVersion);
let (b_loc, _pkg_dir) = mk_temp_workspace(&Path::new("foo"), &NoVersion);
let (a_loc, b_loc) = (a_loc.path(), b_loc.path());
debug!("Trying to install foo in {}", a_loc.display());
command_line_test([~"install", ~"foo"], a_loc);
@ -1401,7 +1401,7 @@ fn rust_path_hack_test(hack_flag: bool) {
let p_id = PkgId::new("foo");
let workspace = create_local_package(&p_id);
let workspace = workspace.path();
let dest_workspace = mk_empty_workspace(&Path::init("bar"), &NoVersion, "dest_workspace");
let dest_workspace = mk_empty_workspace(&Path::new("bar"), &NoVersion, "dest_workspace");
let dest_workspace = dest_workspace.path();
let foo_path = workspace.join_many(["src", "foo-0.1"]);
let rust_path = Some(~[(~"RUST_PATH",
@ -1410,11 +1410,11 @@ fn rust_path_hack_test(hack_flag: bool) {
foo_path.as_str().unwrap()))]);
command_line_test_with_env(~[~"install"] + if hack_flag { ~[~"--rust-path-hack"] } else { ~[] } +
~[~"foo"], dest_workspace, rust_path);
assert_lib_exists(dest_workspace, &Path::init("foo"), NoVersion);
assert_lib_exists(dest_workspace, &Path::new("foo"), NoVersion);
assert_executable_exists(dest_workspace, "foo");
assert_built_library_exists(dest_workspace, "foo");
assert_built_executable_exists(dest_workspace, "foo");
assert!(!lib_exists(workspace, &Path::init("foo"), NoVersion));
assert!(!lib_exists(workspace, &Path::new("foo"), NoVersion));
assert!(!executable_exists(workspace, "foo"));
assert!(!built_library_exists(workspace, "foo"));
assert!(!built_executable_exists(workspace, "foo"));
@ -1449,15 +1449,15 @@ fn rust_path_hack_cwd() {
fs::mkdir_recursive(&cwd, io::UserRWX);
writeFile(&cwd.join("lib.rs"), "pub fn f() { }");
let dest_workspace = mk_empty_workspace(&Path::init("bar"), &NoVersion, "dest_workspace");
let dest_workspace = mk_empty_workspace(&Path::new("bar"), &NoVersion, "dest_workspace");
let dest_workspace = dest_workspace.path();
// FIXME (#9639): This needs to handle non-utf8 paths
let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
command_line_test_with_env([~"install", ~"--rust-path-hack", ~"foo"], &cwd, rust_path);
debug!("Checking that foo exists in {}", dest_workspace.display());
assert_lib_exists(dest_workspace, &Path::init("foo"), NoVersion);
assert_lib_exists(dest_workspace, &Path::new("foo"), NoVersion);
assert_built_library_exists(dest_workspace, "foo");
assert!(!lib_exists(&cwd, &Path::init("foo"), NoVersion));
assert!(!lib_exists(&cwd, &Path::new("foo"), NoVersion));
assert!(!built_library_exists(&cwd, "foo"));
}
@ -1470,15 +1470,15 @@ fn rust_path_hack_multi_path() {
writeFile(&subdir.join("lib.rs"), "pub fn f() { }");
let name = ~"foo/bar/quux";
let dest_workspace = mk_empty_workspace(&Path::init("bar"), &NoVersion, "dest_workspace");
let dest_workspace = mk_empty_workspace(&Path::new("bar"), &NoVersion, "dest_workspace");
let dest_workspace = dest_workspace.path();
// FIXME (#9639): This needs to handle non-utf8 paths
let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
command_line_test_with_env([~"install", ~"--rust-path-hack", name.clone()], &subdir, rust_path);
debug!("Checking that {} exists in {}", name, dest_workspace.display());
assert_lib_exists(dest_workspace, &Path::init("quux"), NoVersion);
assert_lib_exists(dest_workspace, &Path::new("quux"), NoVersion);
assert_built_library_exists(dest_workspace, name);
assert!(!lib_exists(&subdir, &Path::init("quux"), NoVersion));
assert!(!lib_exists(&subdir, &Path::new("quux"), NoVersion));
assert!(!built_library_exists(&subdir, name));
}
@ -1491,15 +1491,15 @@ fn rust_path_hack_install_no_arg() {
assert!(make_dir_rwx(&source_dir));
writeFile(&source_dir.join("lib.rs"), "pub fn f() { }");
let dest_workspace = mk_empty_workspace(&Path::init("bar"), &NoVersion, "dest_workspace");
let dest_workspace = mk_empty_workspace(&Path::new("bar"), &NoVersion, "dest_workspace");
let dest_workspace = dest_workspace.path();
// FIXME (#9639): This needs to handle non-utf8 paths
let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
command_line_test_with_env([~"install", ~"--rust-path-hack"], &source_dir, rust_path);
debug!("Checking that foo exists in {}", dest_workspace.display());
assert_lib_exists(dest_workspace, &Path::init("foo"), NoVersion);
assert_lib_exists(dest_workspace, &Path::new("foo"), NoVersion);
assert_built_library_exists(dest_workspace, "foo");
assert!(!lib_exists(&source_dir, &Path::init("foo"), NoVersion));
assert!(!lib_exists(&source_dir, &Path::new("foo"), NoVersion));
assert!(!built_library_exists(cwd, "foo"));
}
@ -1511,7 +1511,7 @@ fn rust_path_hack_build_no_arg() {
assert!(make_dir_rwx(&source_dir));
writeFile(&source_dir.join("lib.rs"), "pub fn f() { }");
let dest_workspace = mk_empty_workspace(&Path::init("bar"), &NoVersion, "dest_workspace");
let dest_workspace = mk_empty_workspace(&Path::new("bar"), &NoVersion, "dest_workspace");
let dest_workspace = dest_workspace.path();
// FIXME (#9639): This needs to handle non-utf8 paths
let rust_path = Some(~[(~"RUST_PATH", dest_workspace.as_str().unwrap().to_owned())]);
@ -1549,7 +1549,7 @@ fn rust_path_hack_build_with_dependency() {
fn rust_path_install_target() {
let dir_for_path = TempDir::new(
"source_workspace").expect("rust_path_install_target failed");
let mut dir = mk_workspace(dir_for_path.path(), &Path::init("foo"), &NoVersion);
let mut dir = mk_workspace(dir_for_path.path(), &Path::new("foo"), &NoVersion);
debug!("dir = {}", dir.display());
writeFile(&dir.join("main.rs"), "fn main() { let _x = (); }");
let dir_to_install_to = TempDir::new(
@ -1661,7 +1661,7 @@ fn notrans_flag_fail() {
workspace, None, BAD_FLAG_CODE);
assert!(!built_executable_exists(workspace, "foo"));
assert!(!object_file_exists(workspace, "foo"));
assert!(!lib_exists(workspace, &Path::init("foo"), NoVersion));
assert!(!lib_exists(workspace, &Path::new("foo"), NoVersion));
}
}
@ -1929,9 +1929,9 @@ fn test_recursive_deps() {
command_line_test_with_env([~"install", ~"a"],
a_workspace,
environment);
assert_lib_exists(a_workspace, &Path::init("a"), NoVersion);
assert_lib_exists(b_workspace, &Path::init("b"), NoVersion);
assert_lib_exists(b_workspace, &Path::init("c"), NoVersion);
assert_lib_exists(a_workspace, &Path::new("a"), NoVersion);
assert_lib_exists(b_workspace, &Path::new("b"), NoVersion);
assert_lib_exists(b_workspace, &Path::new("c"), NoVersion);
}
#[test]
@ -1939,7 +1939,7 @@ fn test_install_to_rust_path() {
let p_id = PkgId::new("foo");
let second_workspace = create_local_package(&p_id);
let second_workspace = second_workspace.path();
let first_workspace = mk_empty_workspace(&Path::init("p"), &NoVersion, "dest");
let first_workspace = mk_empty_workspace(&Path::new("p"), &NoVersion, "dest");
let first_workspace = first_workspace.path();
// FIXME (#9639): This needs to handle non-utf8 paths
let rust_path = Some(~[(~"RUST_PATH",
@ -1986,7 +1986,7 @@ fn test_target_specific_install_dir() {
~"foo"],
workspace);
assert!(workspace.join_many([~"lib", host_triple()]).is_dir());
assert_lib_exists(workspace, &Path::init("foo"), NoVersion);
assert_lib_exists(workspace, &Path::new("foo"), NoVersion);
assert!(fs::readdir(&workspace.join("lib")).len() == 1);
assert!(workspace.join("bin").is_dir());
assert_executable_exists(workspace, "foo");
@ -2062,7 +2062,7 @@ fn correct_package_name_with_rust_path_hack() {
let bar_id = PkgId::new("bar");
let foo_workspace = create_local_package(&foo_id);
let foo_workspace = foo_workspace.path();
let dest_workspace = mk_empty_workspace(&Path::init("bar"), &NoVersion, "dest_workspace");
let dest_workspace = mk_empty_workspace(&Path::new("bar"), &NoVersion, "dest_workspace");
let dest_workspace = dest_workspace.path();
writeFile(&dest_workspace.join_many(["src", "bar-0.1", "main.rs"]),
@ -2332,7 +2332,7 @@ fn test_c_dependency_ok() {
writeFile(&dir.join_many(["src", "cdep-0.1", "foo.c"]), "void f() {}");
debug!("dir = {}", dir.display());
let source = Path::init(file!()).dir_path().join_many(
let source = Path::new(file!()).dir_path().join_many(
[~"testsuite", ~"pass", ~"src", ~"c-dependencies", ~"pkg.rs"]);
fs::copy(&source, &dir.join_many([~"src", ~"cdep-0.1", ~"pkg.rs"]));
command_line_test([~"build", ~"cdep"], dir);
@ -2354,7 +2354,7 @@ fn test_c_dependency_no_rebuilding() {
writeFile(&dir.join_many(["src", "cdep-0.1", "foo.c"]), "void f() {}");
debug!("dir = {}", dir.display());
let source = Path::init(file!()).dir_path().join_many(
let source = Path::new(file!()).dir_path().join_many(
[~"testsuite", ~"pass", ~"src", ~"c-dependencies", ~"pkg.rs"]);
fs::copy(&source, &dir.join_many([~"src", ~"cdep-0.1", ~"pkg.rs"]));
command_line_test([~"build", ~"cdep"], dir);
@ -2388,7 +2388,7 @@ fn test_c_dependency_yes_rebuilding() {
let c_file_name = dir.join_many(["src", "cdep-0.1", "foo.c"]);
writeFile(&c_file_name, "void f() {}");
let source = Path::init(file!()).dir_path().join_many(
let source = Path::new(file!()).dir_path().join_many(
[~"testsuite", ~"pass", ~"src", ~"c-dependencies", ~"pkg.rs"]);
let target = dir.join_many([~"src", ~"cdep-0.1", ~"pkg.rs"]);
debug!("Copying {} -> {}", source.display(), target.display());

View file

@ -510,7 +510,7 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
self.context.install(
pkg_src,
&WhatToBuild::new(Inferred,
JustOne(Path::init(lib_crate_filename))));
JustOne(Path::new(lib_crate_filename))));
debug!("Installed {}, returned {:?} dependencies and \
{:?} transitive dependencies",
lib_name, outputs_disc.len(), inputs_disc.len());
@ -548,7 +548,7 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
self.exec.discover_input(*what,
*dep,
digest_file_with_date(
&Path::init(dep.as_slice())));
&Path::new(dep.as_slice())));
} else if *what == ~"binary" {
add_dep(self.deps,
self.parent_crate.as_str().unwrap().to_owned(),
@ -556,7 +556,7 @@ impl<'self> Visitor<()> for ViewItemVisitor<'self> {
self.exec.discover_input(*what,
*dep,
digest_only_date(
&Path::init(dep.as_slice())));
&Path::new(dep.as_slice())));
} else {
fail!("Bad kind: {}", *what);
}