Skip to content

Commit 5659cc5

Browse files
committed
Factor out two print_crate_info calls.
1 parent 446c8e0 commit 5659cc5

File tree

1 file changed

+3
-2
lines changed
  • compiler/rustc_driver_impl/src

1 file changed

+3
-2
lines changed

compiler/rustc_driver_impl/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -373,15 +373,16 @@ fn run_compiler(
373373

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

376+
let should_stop = print_crate_info(&handler, codegen_backend, sess, has_input);
377+
376378
if !has_input {
377-
let should_stop = print_crate_info(&handler, codegen_backend, sess, false);
378379
if should_stop == Compilation::Continue {
379380
handler.early_error("no input filename given")
380381
}
381382
return sess.compile_status();
382383
}
383384

384-
let should_stop = print_crate_info(&handler, codegen_backend, sess, true)
385+
let should_stop = should_stop
385386
.and_then(|| list_metadata(&handler, sess, &*codegen_backend.metadata_loader()))
386387
.and_then(|| try_process_rlink(sess, compiler));
387388

0 commit comments

Comments
 (0)