File tree 1 file changed +3
-3
lines changed
src/bootstrap/src/core/build_steps
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -305,9 +305,9 @@ impl Step for Cargo {
305
305
// those features won't be able to land.
306
306
cargo. env ( "CARGO_TEST_DISABLE_NIGHTLY" , "1" ) ;
307
307
cargo. env ( "PATH" , path_for_cargo ( builder, compiler) ) ;
308
- // Cargo's test suite requires configurations from its own `.cargo/config.toml`.
309
- // Change to the directory so Cargo can read from it .
310
- cargo. current_dir ( builder. src . join ( Self :: CRATE_PATH ) ) ;
308
+ // Cargo's test suite uses `CARGO_RUSTC_CURRENT_DIR` to determine the path that `file!` is
309
+ // relative to. Since we are setting `-Zroot-dir`, they will be relative to that .
310
+ cargo. env ( "CARGO_RUSTC_CURRENT_DIR" , builder. src . display ( ) . to_string ( ) ) ;
311
311
312
312
#[ cfg( feature = "build-metrics" ) ]
313
313
builder. metrics . begin_test_suite (
You can’t perform that action at this time.
0 commit comments