Skip to content

Commit d793f80

Browse files
Correctly pass cfg option
1 parent 673661d commit d793f80

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build_system/src/test.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ fn std_tests(env: &Env, args: &TestArg) -> Result<(), String> {
390390
&args.config_info.target_triple,
391391
]);
392392
if !args.no_default_features {
393-
command.push(&"--cfg feature=\"master\"");
393+
command.extend_from_slice(&[&"--cfg", &"feature=\"master\""]);
394394
}
395395
run_command_with_env(&command, None, Some(env))?;
396396

@@ -454,7 +454,7 @@ fn std_tests(env: &Env, args: &TestArg) -> Result<(), String> {
454454
&args.config_info.target_triple,
455455
]);
456456
if !args.no_default_features {
457-
command.push(&"--cfg feature=\"master\"");
457+
command.extend_from_slice(&[&"--cfg", &"feature=\"master\""]);
458458
}
459459
run_command_with_env(&command, None, Some(env))?;
460460
run_command_in_vm(
@@ -1085,8 +1085,9 @@ fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> {
10851085
.filter(|line| !line.is_empty())
10861086
{
10871087
let path = Path::new("rust").join(file);
1088-
std::fs::remove_file(&path)
1089-
.map_err(|error| format!("failed to remove `{}`: {:?}", path.display(), error))?;
1088+
std::fs::remove_file(&path).map_err(|error| {
1089+
format!("failed to remove `{}`: {:?}", path.display(), error)
1090+
})?;
10901091
}
10911092
} else {
10921093
println!(

0 commit comments

Comments
 (0)