Use a dedicated DepKind for the forever-red node.

This commit is contained in:
Camille GILLOT 2022-05-03 22:04:49 +02:00
parent c168fba268
commit e912c8dfe0
5 changed files with 23 additions and 6 deletions

View file

@ -183,6 +183,9 @@ rustc_dep_node_append!([define_dep_nodes!][ <'tcx>
// We use this for most things when incr. comp. is turned off.
[] Null,
// We use this to create a forever-red node.
[] Red,
[anon] TraitSelect,
// WARNING: if `Symbol` is changed, make sure you update `make_compile_codegen_unit` below.

View file

@ -23,6 +23,7 @@ pub type EdgeFilter = rustc_query_system::dep_graph::debug::EdgeFilter<DepKind>;
impl rustc_query_system::dep_graph::DepKind for DepKind {
const NULL: Self = DepKind::Null;
const RED: Self = DepKind::Red;
fn debug_node(node: &DepNode, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{:?}(", node.kind)?;