File tree Expand file tree Collapse file tree 2 files changed +31
-5
lines changed Expand file tree Collapse file tree 2 files changed +31
-5
lines changed Original file line number Diff line number Diff line change @@ -710,14 +710,25 @@ impl DepGraph {
710710 return None
711711 }
712712 None => {
713- if !tcx. sess . has_errors ( ) {
713+ if !tcx. sess . has_errors_or_delayed_span_bugs ( ) {
714714 bug ! ( "try_mark_previous_green() - Forcing the DepNode \
715715 should have set its color")
716716 } else {
717- // If the query we just forced has resulted
718- // in some kind of compilation error, we
719- // don't expect that the corresponding
720- // dep-node color has been updated.
717+ // If the query we just forced has resulted in
718+ // some kind of compilation error, we cannot rely on
719+ // the dep-node color having been properly updated.
720+ // This means that the query system has reached an
721+ // invalid state. We let the compiler continue (by
722+ // returning `None`) so it can emit error messages
723+ // and wind down, but rely on the fact that this
724+ // invalid state will not be persisted to the
725+ // incremental compilation cache because of
726+ // compilation errors being present.
727+ debug ! ( "try_mark_previous_green({:?}) - END - \
728+ dependency {:?} resulted in compilation error",
729+ dep_node,
730+ dep_dep_node) ;
731+ return None
721732 }
722733 }
723734 }
Original file line number Diff line number Diff line change 1+ // revisions: rpass cfail
2+
3+ enum A {
4+ //[cfail]~^ ERROR 3:1: 3:7: recursive type `A` has infinite size [E0072]
5+ B ( C ) ,
6+ }
7+
8+ #[ cfg( rpass) ]
9+ struct C ( Box < A > ) ;
10+
11+ #[ cfg( cfail) ]
12+ struct C ( A ) ;
13+ //[cfail]~^ ERROR 12:1: 12:13: recursive type `C` has infinite size [E0072]
14+
15+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments