Skip to content

Commit

Permalink
incr.comp.: Uniformly represent DepNodes as (Kind, StableHash) pairs.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Jun 9, 2017
1 parent a7ac71b commit 3607174
Show file tree
Hide file tree
Showing 39 changed files with 864 additions and 721 deletions.
11 changes: 5 additions & 6 deletions src/librustc/dep_graph/debug.rs
Expand Up @@ -12,7 +12,6 @@

use super::dep_node::DepNode;
use std::error::Error;
use std::fmt::Debug;

/// A dep-node filter goes from a user-defined string to a query over
/// nodes. Right now the format is like this:
Expand All @@ -39,7 +38,7 @@ impl DepNodeFilter {
}

/// Tests whether `node` meets the filter, returning true if so.
pub fn test<D: Clone + Debug>(&self, node: &DepNode<D>) -> bool {
pub fn test(&self, node: &DepNode) -> bool {
let debug_str = format!("{:?}", node);
self.text.split("&")
.map(|s| s.trim())
Expand Down Expand Up @@ -67,10 +66,10 @@ impl EdgeFilter {
}
}

pub fn test<D: Clone + Debug>(&self,
source: &DepNode<D>,
target: &DepNode<D>)
-> bool {
pub fn test(&self,
source: &DepNode,
target: &DepNode)
-> bool {
self.source.test(source) && self.target.test(target)
}
}

0 comments on commit 3607174

Please sign in to comment.