mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Make needs_analysis
true for PpHirMode::Typed
.
This avoids the need for a bespoke `tcx.analysis()` call.
This commit is contained in:
parent
ba58e3213d
commit
b65227a9ee
@ -297,7 +297,6 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
|
||||
f(&annotation)
|
||||
}
|
||||
PpHirMode::Typed => {
|
||||
abort_on_err(tcx.analysis(()), tcx.sess);
|
||||
let annotation = TypedAnnotation { tcx, maybe_typeck_results: Cell::new(None) };
|
||||
tcx.dep_graph.with_ignore(|| f(&annotation))
|
||||
}
|
||||
|
@ -3144,7 +3144,7 @@ impl PpMode {
|
||||
|
||||
pub fn needs_analysis(&self) -> bool {
|
||||
use PpMode::*;
|
||||
matches!(*self, Mir | MirCFG | ThirTree | ThirFlat)
|
||||
matches!(*self, Hir(PpHirMode::Typed) | Mir | MirCFG | ThirTree | ThirFlat)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user