Skip to content

Commit 7562d2c

Browse files
Fix build failure in cfg-if
1 parent 2b070a6 commit 7562d2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

build_system/src/test.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,12 +645,16 @@ fn test_projects(env: &Env, args: &TestArg) -> Result<(), String> {
645645
//"https://github.com/rust-lang/cargo", // TODO: very slow, only run on master?
646646
];
647647

648+
let mut env = env.clone();
649+
let rustflags =
650+
format!("{} --cap-lints allow", env.get("RUSTFLAGS").cloned().unwrap_or_default());
651+
env.insert("RUSTFLAGS".to_string(), rustflags);
648652
let run_tests = |projects_path, iter: &mut dyn Iterator<Item = &&str>| -> Result<(), String> {
649653
for project in iter {
650654
let clone_result = git_clone_root_dir(project, projects_path, true)?;
651655
let repo_path = Path::new(&clone_result.repo_dir);
652-
run_cargo_command(&[&"build", &"--release"], Some(repo_path), env, args)?;
653-
run_cargo_command(&[&"test"], Some(repo_path), env, args)?;
656+
run_cargo_command(&[&"build", &"--release"], Some(repo_path), &env, args)?;
657+
run_cargo_command(&[&"test"], Some(repo_path), &env, args)?;
654658
}
655659

656660
Ok(())

0 commit comments

Comments
 (0)