From facdf2ebb1dce9400a8c8ef0d85d7d278654effb Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Fri, 31 Jul 2015 00:04:06 -0700 Subject: Add an intital HIR and lowering step --- src/libsyntax/feature_gate.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libsyntax/feature_gate.rs') diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 78234a8efce..0c0c68c89a1 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -356,12 +356,14 @@ pub struct GatedCfg { span: Span, index: usize, } + impl Ord for GatedCfg { fn cmp(&self, other: &GatedCfg) -> cmp::Ordering { (self.span.lo.0, self.span.hi.0, self.index) .cmp(&(other.span.lo.0, other.span.hi.0, other.index)) } } + impl PartialOrd for GatedCfg { fn partial_cmp(&self, other: &GatedCfg) -> Option { Some(self.cmp(other)) -- cgit 1.4.1-3-g733a5