Allow tools (e.g. miri) to enable rust logging
This commit is contained in:
parent
34772aad63
commit
1d438f87e7
1 changed files with 7 additions and 1 deletions
|
@ -1574,8 +1574,14 @@ pub fn diagnostics_registry() -> errors::registry::Registry {
|
||||||
Registry::new(&all_errors)
|
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();
|
env_logger::init();
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn main() {
|
||||||
|
init_rustc_env_logger();
|
||||||
let result = run(|| {
|
let result = run(|| {
|
||||||
let args = env::args_os().enumerate()
|
let args = env::args_os().enumerate()
|
||||||
.map(|(i, arg)| arg.into_string().unwrap_or_else(|arg| {
|
.map(|(i, arg)| arg.into_string().unwrap_or_else(|arg| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue