make DepNode PartialOrd

This commit is contained in:
Niko Matsakis 2016-08-05 20:00:20 -04:00
parent 0e97240f98
commit a92b1a7981
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@ macro_rules! try_opt {
)
}
#[derive(Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
pub enum DepNode<D: Clone + Debug> {
// The `D` type is "how definitions are identified".
// During compilation, it is always `DefId`, but when serializing
@ -245,6 +245,6 @@ impl<D: Clone + Debug> DepNode<D> {
/// some independent path or string that persists between runs without
/// the need to be mapped or unmapped. (This ensures we can serialize
/// them even in the absence of a tcx.)
#[derive(Clone, Debug, PartialEq, Eq, Hash, RustcEncodable, RustcDecodable)]
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash, RustcEncodable, RustcDecodable)]
pub struct WorkProductId(pub String);

View File

@ -17,6 +17,7 @@ mod directory;
mod dirty_clean;
mod hash;
mod load;
mod preds;
mod save;
mod util;
mod work_product;