Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions tests/testsuite/standard_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use cargo_test_support::registry::{Dependency, Package};
use cargo_test_support::ProjectBuilder;
use cargo_test_support::{is_nightly, paths, project, rustc_host, Execs};
use std::path::PathBuf;
use std::path::{Path, PathBuf};

struct Setup {
rustc_wrapper: PathBuf,
Expand Down Expand Up @@ -131,15 +131,7 @@ fn setup() -> Option<Setup> {
fn enable_build_std(e: &mut Execs, setup: &Setup) {
// First up, force Cargo to use our "mock sysroot" which mimics what
// libstd looks like upstream.
let root = paths::root();
let root = root
.parent() // chop off test name
.unwrap()
.parent() // chop off `citN`
.unwrap()
.parent() // chop off `target`
.unwrap()
.join("tests/testsuite/mock-std");
let root = Path::new(env!("CARGO_MANIFEST_DIR")).join("tests/testsuite/mock-std");
e.env("__CARGO_TESTS_ONLY_SRC_ROOT", &root);

e.masquerade_as_nightly_cargo();
Expand Down