We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PartialEq
DepNodeColor
1 parent 42fc95d commit 44e6926Copy full SHA for 44e6926
compiler/rustc_query_system/src/dep_graph/graph.rs
@@ -57,7 +57,6 @@ pub struct MarkFrame<'a> {
57
parent: Option<&'a MarkFrame<'a>>,
58
}
59
60
-#[derive(PartialEq)]
61
enum DepNodeColor {
62
Red,
63
Green(DepNodeIndex),
@@ -932,7 +931,7 @@ impl<D: Deps> DepGraph<D> {
932
931
/// Returns true if the given node has been marked as red during the
933
/// current compilation session. Used in various assertions
934
pub fn is_red(&self, dep_node: &DepNode) -> bool {
935
- self.node_color(dep_node) == Some(DepNodeColor::Red)
+ matches!(self.node_color(dep_node), Some(DepNodeColor::Red))
936
937
938
/// Returns true if the given node has been marked as green during the
0 commit comments