mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 05:03:21 +00:00
rustc_driver: factor out computing the exit code
This commit is contained in:
parent
51158cc71f
commit
30822733f0
1 changed files with 1 additions and 3 deletions
|
@ -296,7 +296,7 @@ pub fn main() {
|
|||
rustc_driver::init_rustc_env_logger();
|
||||
lazy_static::initialize(&ICE_HOOK);
|
||||
exit(
|
||||
rustc_driver::catch_fatal_errors(move || {
|
||||
rustc_driver::catch_with_exit_code(move || {
|
||||
let mut orig_args: Vec<String> = env::args().collect();
|
||||
|
||||
if orig_args.iter().any(|a| a == "--version" || a == "-V") {
|
||||
|
@ -411,7 +411,5 @@ pub fn main() {
|
|||
if clippy_enabled { &mut clippy } else { &mut default };
|
||||
rustc_driver::run_compiler(&args, callbacks, None, None)
|
||||
})
|
||||
.and_then(|result| result)
|
||||
.is_err() as i32,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue