]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc_driver/lib.rs
Rollup merge of #66045 - mzabaluev:unwrap-infallible, r=dtolnay
[rust.git] / src / librustc_driver / lib.rs
index adcf6ae2a7c45b32eaa2647ff9b48c79aa6a2f9f..a5277bcd120ed19672a579ed4eb9dd4786615abe 100644 (file)
@@ -25,7 +25,6 @@
 
 //use rustc_resolve as resolve;
 use errors::{registry::Registry, PResult};
-use rustc::hir::def_id::LOCAL_CRATE;
 use rustc::lint;
 use rustc::lint::Lint;
 use rustc::middle::cstore::MetadataLoader;
 use rustc::session::{config, DiagnosticOutput, Session};
 use rustc::session::{early_error, early_warn};
 use rustc::ty::TyCtxt;
-use rustc::util::common::{print_time_passes_entry, set_time_depth, time, ErrorReported};
+use rustc::util::common::ErrorReported;
 use rustc_codegen_utils::codegen_backend::CodegenBackend;
+use rustc_data_structures::profiling::print_time_passes_entry;
 use rustc_data_structures::sync::SeqCst;
 use rustc_feature::{find_gated_cfg, UnstableFeatures};
+use rustc_hir::def_id::LOCAL_CRATE;
 use rustc_interface::util::get_builtin_codegen_backend;
 use rustc_interface::{interface, Queries};
 use rustc_metadata::locator;
 use std::str;
 use std::time::Instant;
 
+use rustc_span::source_map::FileLoader;
+use rustc_span::symbol::sym;
+use rustc_span::FileName;
 use syntax::ast;
-use syntax_pos::source_map::FileLoader;
-use syntax_pos::symbol::sym;
-use syntax_pos::FileName;
 
 mod args;
 pub mod pretty;
@@ -368,7 +369,7 @@ pub fn run_compiler(
                 queries.global_ctxt()?.peek_mut().enter(|tcx| {
                     let result = tcx.analysis(LOCAL_CRATE);
 
-                    time(sess, "save analysis", || {
+                    sess.time("save_analysis", || {
                         save::process_crate(
                             tcx,
                             &expanded_crate,
@@ -1177,7 +1178,6 @@ pub fn report_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
     if !info.payload().is::<errors::ExplicitBug>() {
         let d = errors::Diagnostic::new(errors::Level::Bug, "unexpected panic");
         handler.emit_diagnostic(&d);
-        handler.abort_if_errors_and_should_abort();
     }
 
     let mut xs: Vec<Cow<'static, str>> = vec![
@@ -1260,7 +1260,6 @@ pub fn main() {
         Err(_) => EXIT_FAILURE,
     };
     // The extra `\t` is necessary to align this label with the others.
-    set_time_depth(0);
     print_time_passes_entry(callbacks.time_passes, "\ttotal", start.elapsed());
     process::exit(exit_code);
 }