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 61b4c0c commit d103bd4Copy full SHA for d103bd4
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