Skip to content

Commit

Permalink
Rollup merge of rust-lang#123672 - davidtwco:compiletest-unset-log-co…
Browse files Browse the repository at this point in the history
…lor, r=clubby789

compiletest: unset `RUSTC_LOG_COLOR`

If this leaks in from the environment then it can make tests fail when they deliberately trigger `WARN` or `ERROR` logging, currently this stops these tests from failing if you set `RUSTC_LOG_COLOR=always` in the parent environment:

- `tests/ui/coherence/occurs-check/associated-type.rs#next`
- `tests/ui/coherence/occurs-check/associated-type.rs#old`
- `tests/ui/higher-ranked/structually-relate-aliases.rs`
- `tests/ui/self/arbitrary-self-from-method-substs.rs#default`
- `tests/ui/traits/next-solver/issue-118950-root-region.rs`
  • Loading branch information
GuillaumeGomez committed Apr 9, 2024
2 parents 4f563a1 + 8d251c2 commit ed43ac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl TestProps {
aux_crates: vec![],
revisions: vec![],
rustc_env: vec![("RUSTC_ICE".to_string(), "0".to_string())],
unset_rustc_env: vec![],
unset_rustc_env: vec![("RUSTC_LOG_COLOR".to_string())],
exec_env: vec![],
unset_exec_env: vec![],
build_aux_docs: false,
Expand Down

0 comments on commit ed43ac6

Please sign in to comment.