Fix record_diagnostic
This commit is contained in:
parent
9a847b1ea5
commit
b43a29711e
1 changed files with 6 additions and 2 deletions
|
@ -538,10 +538,14 @@ impl<D: Deps> DepGraph<D> {
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn record_diagnostic<Qcx: QueryContext>(&self, qcx: Qcx, diagnostic: &DiagInner) {
|
pub fn record_diagnostic<Qcx: QueryContext>(&self, qcx: Qcx, diagnostic: &DiagInner) {
|
||||||
if let Some(ref data) = self.data {
|
if let Some(ref data) = self.data {
|
||||||
|
D::read_deps(|task_deps| match task_deps {
|
||||||
|
TaskDepsRef::EvalAlways | TaskDepsRef::Ignore => return,
|
||||||
|
TaskDepsRef::Forbid | TaskDepsRef::Allow(..) => {
|
||||||
self.read_index(data.encode_diagnostic(qcx, diagnostic));
|
self.read_index(data.encode_diagnostic(qcx, diagnostic));
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This forces a diagnostic node green by running its side effect. `prev_index` would
|
/// This forces a diagnostic node green by running its side effect. `prev_index` would
|
||||||
/// refer to a node created used `encode_diagnostic` in the previous session.
|
/// refer to a node created used `encode_diagnostic` in the previous session.
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue