Allow tools (e.g. miri) to enable rust logging

上级 34772aad
......@@ -1574,8 +1574,14 @@ pub fn diagnostics_registry() -> errors::registry::Registry {
Registry::new(&all_errors)
}
pub fn main() {
/// This allows tools to enable rust logging without having to magically match rustc's
/// log crate version
pub fn init_rustc_env_logger() {
env_logger::init();
}
pub fn main() {
init_rustc_env_logger();
let result = run(|| {
let args = env::args_os().enumerate()
.map(|(i, arg)| arg.into_string().unwrap_or_else(|arg| {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册