diff options
| author | Eric Huss <eric@huss.org> | 2021-05-25 11:48:59 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2021-05-25 14:40:33 -0700 |
| commit | 074d667cf507b55f74a721709cdfdf476102fbbe (patch) | |
| tree | 1f82721876b2ac1c5242262ebb47fc8ac0c54f6a /compiler/rustc_interface | |
| parent | cdbe2888979bb8797b05f0d58a6f6e60753983d2 (diff) | |
| download | rust-074d667cf507b55f74a721709cdfdf476102fbbe.tar.gz rust-074d667cf507b55f74a721709cdfdf476102fbbe.zip | |
Don't panic when failing to initialize incremental directory.
Diffstat (limited to 'compiler/rustc_interface')
| -rw-r--r-- | compiler/rustc_interface/src/passes.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_interface/src/queries.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 70ffff1ab99..f99d9290238 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -172,7 +172,7 @@ pub fn register_plugins<'a>( let disambiguator = util::compute_crate_disambiguator(sess); sess.crate_disambiguator.set(disambiguator).expect("not yet initialized"); - rustc_incremental::prepare_session_directory(sess, &crate_name, disambiguator); + rustc_incremental::prepare_session_directory(sess, &crate_name, disambiguator)?; if sess.opts.incremental.is_some() { sess.time("incr_comp_garbage_collect_session_directories", || { diff --git a/compiler/rustc_interface/src/queries.rs b/compiler/rustc_interface/src/queries.rs index 92d05e48068..969b526235b 100644 --- a/compiler/rustc_interface/src/queries.rs +++ b/compiler/rustc_interface/src/queries.rs @@ -148,7 +148,7 @@ impl<'tcx> Queries<'tcx> { self.compiler.register_lints.as_deref().unwrap_or_else(|| empty), krate, &crate_name, - ); + )?; // Compute the dependency graph (in the background). We want to do // this as early as possible, to give the DepGraph maximum time to @@ -157,7 +157,7 @@ impl<'tcx> Queries<'tcx> { // called, which happens within passes::register_plugins(). self.dep_graph_future().ok(); - result + Ok(result) }) } |
