From 9e6e89af697dad4e4505111adef37733cdcbe47e Mon Sep 17 00:00:00 2001 From: Matthew Jasper Date: Sun, 10 Oct 2021 19:59:36 +0100 Subject: [PATCH] Fix RUSTC_LOG handling Rustc was incorrectly reading the value of `RUSTC_LOG` as the environment vairable with the logging configuration, rather than the logging configuration itself. --- compiler/rustc_driver/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 05c7e11cbc29a..9a57ec991444a 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1259,7 +1259,7 @@ pub fn init_env_logger(env: &str) { }; let filter = match std::env::var(env) { - Ok(env) => EnvFilter::from_env(env), + Ok(env) => EnvFilter::new(env), _ => EnvFilter::default().add_directive(filter::Directive::from(LevelFilter::WARN)), };