@@ -520,21 +520,26 @@ impl<D: Deps> DepGraph<D> {
520
520
D :: read_deps ( |task_deps| match task_deps {
521
521
TaskDepsRef :: EvalAlways | TaskDepsRef :: Ignore => return ,
522
522
TaskDepsRef :: Forbid | TaskDepsRef :: Allow ( ..) => {
523
- self . read_index ( data. encode_diagnostic ( qcx, diagnostic) ) ;
523
+ self . read_index (
524
+ data. encode_side_effect (
525
+ qcx,
526
+ QuerySideEffect :: Diagnostic ( diagnostic. clone ( ) ) ,
527
+ ) ,
528
+ ) ;
524
529
}
525
530
} )
526
531
}
527
532
}
528
533
/// This forces a diagnostic node green by running its side effect. `prev_index` would
529
- /// refer to a node created used `encode_diagnostic` in the previous session.
534
+ /// refer to a node created used [Self::record_diagnostic] in the previous session.
530
535
#[ inline]
531
- pub fn force_diagnostic_node < Qcx : QueryContext > (
536
+ pub fn force_side_effect_node < Qcx : QueryContext > (
532
537
& self ,
533
538
qcx : Qcx ,
534
539
prev_index : SerializedDepNodeIndex ,
535
540
) {
536
541
if let Some ( ref data) = self . data {
537
- data. force_diagnostic_node ( qcx, prev_index) ;
542
+ data. force_side_effect_node ( qcx, prev_index) ;
538
543
}
539
544
}
540
545
@@ -665,10 +670,10 @@ impl<D: Deps> DepGraphData<D> {
665
670
/// This encodes a diagnostic by creating a node with an unique index and assoicating
666
671
/// `diagnostic` with it, for use in the next session.
667
672
#[ inline]
668
- fn encode_diagnostic < Qcx : QueryContext > (
673
+ fn encode_side_effect < Qcx : QueryContext > (
669
674
& self ,
670
675
qcx : Qcx ,
671
- diagnostic : & DiagInner ,
676
+ side_effect : QuerySideEffect ,
672
677
) -> DepNodeIndex {
673
678
// Use `send_new` so we get an unique index, even though the dep node is not.
674
679
let dep_node_index = self . current . encoder . send_new (
@@ -677,19 +682,18 @@ impl<D: Deps> DepGraphData<D> {
677
682
hash : PackedFingerprint :: from ( Fingerprint :: ZERO ) ,
678
683
} ,
679
684
Fingerprint :: ZERO ,
680
- // We want the side effect node to always be red so it will be forced and emit the
681
- // diagnostic.
685
+ // We want the side effect node to always be red so it will be forced and apply
686
+ // the side effect
682
687
std:: iter:: once ( DepNodeIndex :: FOREVER_RED_NODE ) . collect ( ) ,
683
688
) ;
684
- let side_effect = QuerySideEffect :: Diagnostic ( diagnostic. clone ( ) ) ;
685
689
qcx. store_side_effect ( dep_node_index, side_effect) ;
686
690
dep_node_index
687
691
}
688
692
689
693
/// This forces a diagnostic node green by running its side effect. `prev_index` would
690
- /// refer to a node created used `encode_diagnostic` in the previous session.
694
+ /// refer to a node created used [Self::encode_side_effect] in the previous session.
691
695
#[ inline]
692
- fn force_diagnostic_node < Qcx : QueryContext > (
696
+ fn force_side_effect_node < Qcx : QueryContext > (
693
697
& self ,
694
698
qcx : Qcx ,
695
699
prev_index : SerializedDepNodeIndex ,
0 commit comments