X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_driver%2Fsrc%2Fpretty.rs;h=370ec053cbbcbbcc62b59486e9f79249b6296024;hb=1fb9cad50a8d538bf4903f8c2e6af5c2bd6a3081;hp=e0c140b143be89326b7f743ecfd5a1413ae5cc35;hpb=0bde3b1f80f642831d8de5cd76e90fc468dd3ab5;p=rust.git diff --git a/compiler/rustc_driver/src/pretty.rs b/compiler/rustc_driver/src/pretty.rs index e0c140b143b..370ec053cbb 100644 --- a/compiler/rustc_driver/src/pretty.rs +++ b/compiler/rustc_driver/src/pretty.rs @@ -4,7 +4,6 @@ use rustc_ast_pretty::pprust; use rustc_errors::ErrorReported; use rustc_hir as hir; -use rustc_hir::def_id::LOCAL_CRATE; use rustc_hir_pretty as pprust_hir; use rustc_middle::hir::map as hir_map; use rustc_middle::ty::{self, TyCtxt}; @@ -74,7 +73,7 @@ fn call_with_pp_support_hir(ppmode: &PpHirMode, tcx: TyCtxt<'_>, f: F) -> f(&annotation, tcx.hir().krate()) } PpHirMode::Typed => { - abort_on_err(tcx.analysis(LOCAL_CRATE), tcx.sess); + abort_on_err(tcx.analysis(()), tcx.sess); let annotation = TypedAnnotation { tcx, maybe_typeck_results: Cell::new(None) }; tcx.dep_graph.with_ignore(|| f(&annotation, tcx.hir().krate())) @@ -475,7 +474,7 @@ fn print_with_analysis( ppm: PpMode, ofile: Option<&Path>, ) -> Result<(), ErrorReported> { - tcx.analysis(LOCAL_CRATE)?; + tcx.analysis(())?; let out = match ppm { Mir => {