diff options
| author | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-07 13:59:50 +0000 | 
|---|---|---|
| committer | Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de> | 2024-03-11 08:43:50 +0000 | 
| commit | 4279da583ca591ea48c79d13ed1a4d4f83aa6327 (patch) | |
| tree | 45e5d055efc9888620854b31488f386294138269 /compiler/rustc_driver_impl/src/pretty.rs | |
| parent | a6d93acf5fdeb020ab86cc0d30d5672c23a7dba6 (diff) | |
| download | rust-4279da583ca591ea48c79d13ed1a4d4f83aa6327.tar.gz rust-4279da583ca591ea48c79d13ed1a4d4f83aa6327.zip | |
Never bail out early while running all the type check queries
Diffstat (limited to 'compiler/rustc_driver_impl/src/pretty.rs')
| -rw-r--r-- | compiler/rustc_driver_impl/src/pretty.rs | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs index c9bbe45b212..c0c6201f73d 100644 --- a/compiler/rustc_driver_impl/src/pretty.rs +++ b/compiler/rustc_driver_impl/src/pretty.rs @@ -336,7 +336,8 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) { ThirTree => { let tcx = ex.tcx(); let mut out = String::new(); - if rustc_hir_analysis::check_crate(tcx).is_err() { + rustc_hir_analysis::check_crate(tcx); + if tcx.dcx().has_errors().is_some() { FatalError.raise(); } debug!("pretty printing THIR tree"); @@ -348,7 +349,8 @@ pub fn print<'tcx>(sess: &Session, ppm: PpMode, ex: PrintExtra<'tcx>) { ThirFlat => { let tcx = ex.tcx(); let mut out = String::new(); - if rustc_hir_analysis::check_crate(tcx).is_err() { + rustc_hir_analysis::check_crate(tcx); + if tcx.dcx().has_errors().is_some() { FatalError.raise(); } debug!("pretty printing THIR flat"); | 
