diff --git a/tests/testsuite/directory.rs b/tests/testsuite/directory.rs index 4c13565415e..7d58ccb44cf 100644 --- a/tests/testsuite/directory.rs +++ b/tests/testsuite/directory.rs @@ -805,7 +805,7 @@ fn root_dir_diagnostics() { // Crucially, the rustc error message below says `ws_root/...`, i.e. // it is relative to our fake home, not to the workspace root. p.cargo("check") - .arg("-Zroot-dir=.") + .arg(format!("-Zroot-dir={}", p.root().display())) .arg("--manifest-path=ws_root/Cargo.toml") .masquerade_as_nightly_cargo(&["-Zroot-dir"]) .with_status(101)