We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PartialEq
DepNodeColor
1 parent 5768c16 commit 8bdb617Copy full SHA for 8bdb617
compiler/rustc_query_system/src/dep_graph/graph.rs
@@ -64,7 +64,6 @@ pub struct MarkFrame<'a> {
64
parent: Option<&'a MarkFrame<'a>>,
65
}
66
67
-#[derive(PartialEq)]
68
enum DepNodeColor {
69
Red,
70
Green(DepNodeIndex),
@@ -925,7 +924,7 @@ impl<D: Deps> DepGraph<D> {
925
924
/// Returns true if the given node has been marked as red during the
926
/// current compilation session. Used in various assertions
927
pub fn is_red(&self, dep_node: &DepNode) -> bool {
928
- self.node_color(dep_node) == Some(DepNodeColor::Red)
+ matches!(self.node_color(dep_node), Some(DepNodeColor::Red))
929
930
931
/// Returns true if the given node has been marked as green during the
0 commit comments