Revert "Auto merge of #122140 - oli-obk:track_errors13, r=davidtwco"

This reverts commit 65cd843ae0, reversing
changes made to d255c6a57c.
This commit is contained in:
Oli Scherer 2024-03-11 21:28:16 +00:00
parent 6554a5645a
commit 96d24f2dd1
33 changed files with 443 additions and 419 deletions

View file

@ -336,8 +336,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
ThirTree => {
let tcx = ex.tcx();
let mut out = String::new();
rustc_hir_analysis::check_crate(tcx);
if tcx.dcx().has_errors().is_some() {
if rustc_hir_analysis::check_crate(tcx).is_err() {
FatalError.raise();
}
debug!("pretty printing THIR tree");
@ -349,8 +348,7 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) {
ThirFlat => {
let tcx = ex.tcx();
let mut out = String::new();
rustc_hir_analysis::check_crate(tcx);
if tcx.dcx().has_errors().is_some() {
if rustc_hir_analysis::check_crate(tcx).is_err() {
FatalError.raise();
}
debug!("pretty printing THIR flat");