diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-17 13:45:30 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-11-18 07:40:37 +1100 |
| commit | 5659cc57e96a858ce57380553d2cae8f6da6ec5f (patch) | |
| tree | 9c0b3eb09964cda5fd735e8087837543fa9a3d08 /compiler/rustc_driver_impl/src | |
| parent | 446c8e06d9480ac195077aa82d94759ed8eb637d (diff) | |
| download | rust-5659cc57e96a858ce57380553d2cae8f6da6ec5f.tar.gz rust-5659cc57e96a858ce57380553d2cae8f6da6ec5f.zip | |
Factor out two `print_crate_info` calls.
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 9c1a5d50230..a2e78336e71 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -373,15 +373,16 @@ fn run_compiler( let handler = EarlyErrorHandler::new(sess.opts.error_format); + let should_stop = print_crate_info(&handler, codegen_backend, sess, has_input); + if !has_input { - let should_stop = print_crate_info(&handler, codegen_backend, sess, false); if should_stop == Compilation::Continue { handler.early_error("no input filename given") } return sess.compile_status(); } - let should_stop = print_crate_info(&handler, codegen_backend, sess, true) + let should_stop = should_stop .and_then(|| list_metadata(&handler, sess, &*codegen_backend.metadata_loader())) .and_then(|| try_process_rlink(sess, compiler)); |
