From 4d7d101a76deea69e9078d9ed6bb93ecca70e52a Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 24 Feb 2014 08:11:00 -0500 Subject: create a sensible comparison trait hierarchy * `Ord` inherits from `Eq` * `TotalOrd` inherits from `TotalEq` * `TotalOrd` inherits from `Ord` * `TotalEq` inherits from `Eq` This is a partial implementation of #12517. --- src/libsyntax/ast.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs index a8480b6cfeb..0a959993517 100644 --- a/src/libsyntax/ast.rs +++ b/src/libsyntax/ast.rs @@ -39,7 +39,7 @@ pub fn P(value: T) -> P { // table) and a SyntaxContext to track renaming and // macro expansion per Flatt et al., "Macros // That Work Together" -#[deriving(Clone, Hash, TotalEq, TotalOrd, Show)] +#[deriving(Clone, Hash, Ord, TotalEq, TotalOrd, Show)] pub struct Ident { name: Name, ctxt: SyntaxContext @@ -151,7 +151,7 @@ pub type CrateNum = u32; pub type NodeId = u32; -#[deriving(Clone, TotalEq, TotalOrd, Eq, Encodable, Decodable, Hash, Show)] +#[deriving(Clone, TotalEq, TotalOrd, Ord, Eq, Encodable, Decodable, Hash, Show)] pub struct DefId { krate: CrateNum, node: NodeId, -- cgit 1.4.1-3-g733a5