]> git.lizzy.rs Git - rust.git/commitdiff
rustc: Don't ICE if we invalidate an invalid incr dir
authorAlex Crichton <alex@alexcrichton.com>
Fri, 5 Jan 2018 18:07:36 +0000 (10:07 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 5 Jan 2018 18:51:29 +0000 (10:51 -0800)
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

index 54bcc64d0685d70ac7d99338c9cd43811698b4e4..19fbbe10be9e079b833e17bdc749f5bd5ce364c1 100644 (file)
@@ -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),
         };