diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-11-23 16:09:11 +0100 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2023-12-04 15:29:23 +0100 |
| commit | d793f80bd4ceb85c032e18c1d0badac9a8664bba (patch) | |
| tree | 575765f43d5df35c29da6e27b776b3d0b9a19344 | |
| parent | 673661db8b35fbbdc71b91af9b122a7eaf7f7bf3 (diff) | |
| download | rust-d793f80bd4ceb85c032e18c1d0badac9a8664bba.tar.gz rust-d793f80bd4ceb85c032e18c1d0badac9a8664bba.zip | |
Correctly pass `cfg` option
| -rw-r--r-- | build_system/src/test.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build_system/src/test.rs b/build_system/src/test.rs index e175b62625c..614042b36c2 100644 --- a/build_system/src/test.rs +++ b/build_system/src/test.rs @@ -390,7 +390,7 @@ fn std_tests(env: &Env, args: &TestArg) -> Result<(), String> { &args.config_info.target_triple, ]); if !args.no_default_features { - command.push(&"--cfg feature=\"master\""); + command.extend_from_slice(&[&"--cfg", &"feature=\"master\""]); } run_command_with_env(&command, None, Some(env))?; @@ -454,7 +454,7 @@ fn std_tests(env: &Env, args: &TestArg) -> Result<(), String> { &args.config_info.target_triple, ]); if !args.no_default_features { - command.push(&"--cfg feature=\"master\""); + command.extend_from_slice(&[&"--cfg", &"feature=\"master\""]); } run_command_with_env(&command, None, Some(env))?; run_command_in_vm( @@ -1085,8 +1085,9 @@ fn test_successful_rustc(env: &Env, args: &TestArg) -> Result<(), String> { .filter(|line| !line.is_empty()) { let path = Path::new("rust").join(file); - std::fs::remove_file(&path) - .map_err(|error| format!("failed to remove `{}`: {:?}", path.display(), error))?; + std::fs::remove_file(&path).map_err(|error| { + format!("failed to remove `{}`: {:?}", path.display(), error) + })?; } } else { println!( |
