]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_query_system/src/dep_graph/mod.rs
Use a dedicated DepKind for the forever-red node.
[rust.git] / compiler / rustc_query_system / src / dep_graph / mod.rs
index 345ada263e4d23435bc2f78afd70b10b9d0f3b4b..342d95ca490ea276a5ecd2dfb3b2bc6aa3b44f1f 100644 (file)
@@ -85,8 +85,12 @@ pub fn reconstructible(self) -> bool {
 
 /// Describe the different families of dependency nodes.
 pub trait DepKind: Copy + fmt::Debug + Eq + Hash + Send + Encodable<FileEncoder> + 'static {
+    /// DepKind to use when incr. comp. is turned off.
     const NULL: Self;
 
+    /// DepKind to use to create the initial forever-red node.
+    const RED: Self;
+
     /// Implementation of `std::fmt::Debug` for `DepNode`.
     fn debug_node(node: &DepNode<Self>, f: &mut fmt::Formatter<'_>) -> fmt::Result;