We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
record_diagnostic
1 parent 9a847b1 commit b43a297Copy full SHA for b43a297
compiler/rustc_query_system/src/dep_graph/graph.rs
@@ -538,10 +538,14 @@ impl<D: Deps> DepGraph<D> {
538
#[inline]
539
pub fn record_diagnostic<Qcx: QueryContext>(&self, qcx: Qcx, diagnostic: &DiagInner) {
540
if let Some(ref data) = self.data {
541
- self.read_index(data.encode_diagnostic(qcx, diagnostic));
+ D::read_deps(|task_deps| match task_deps {
542
+ TaskDepsRef::EvalAlways | TaskDepsRef::Ignore => return,
543
+ TaskDepsRef::Forbid | TaskDepsRef::Allow(..) => {
544
+ self.read_index(data.encode_diagnostic(qcx, diagnostic));
545
+ }
546
+ })
547
}
548
-
549
/// This forces a diagnostic node green by running its side effect. `prev_index` would
550
/// refer to a node created used `encode_diagnostic` in the previous session.
551
0 commit comments