From fcdca7f2da86111704e54e932f3e5ffa31d70366 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 5 Jan 2018 10:07:36 -0800 Subject: [PATCH] rustc: Don't ICE if we invalidate an invalid incr dir This showed up on the Windows bot for testing this PR, and this pr allows `mark_incr_comp_session_as_invalid` ok if it's already invalid, hopefully avoiding scary ICEs and instead leaving the nicely printed errors --- src/librustc/session/mod.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 54bcc64d068..19fbbe10be9 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -642,6 +642,7 @@ pub fn mark_incr_comp_session_as_invalid(&self) { IncrCompSession::Active { ref session_directory, .. } => { session_directory.clone() } + IncrCompSession::InvalidBecauseOfErrors { .. } => return, _ => bug!("Trying to invalidate IncrCompSession `{:?}`", *incr_comp_session), }; -- 2.44.0