Skip to content

Commit 08d7498

Browse files
committed
Factor out two print_crate_info calls.
1 parent 4838843 commit 08d7498

File tree

1 file changed

+8
-7
lines changed
  • compiler/rustc_driver_impl/src

1 file changed

+8
-7
lines changed

compiler/rustc_driver_impl/src/lib.rs

+8-7
Original file line numberDiff line numberDiff line change
@@ -372,20 +372,21 @@ fn run_compiler(
372372

373373
let handler = EarlyErrorHandler::new(sess.opts.error_format);
374374

375+
let should_stop = print_crate_info(
376+
&handler,
377+
&**compiler.codegen_backend(),
378+
compiler.session(),
379+
has_input,
380+
);
381+
375382
if !has_input {
376-
let should_stop = print_crate_info(
377-
&handler,
378-
&**compiler.codegen_backend(),
379-
compiler.session(),
380-
false,
381-
);
382383
if should_stop == Compilation::Continue {
383384
handler.early_error("no input filename given")
384385
}
385386
return sess.compile_status();
386387
}
387388

388-
let should_stop = print_crate_info(&handler, &**compiler.codegen_backend(), sess, true)
389+
let should_stop = should_stop
389390
.and_then(|| {
390391
list_metadata(&handler, sess, &*compiler.codegen_backend().metadata_loader())
391392
})

0 commit comments

Comments
 (0)