From c7711002bb3eed4ecbc8c8da63c97681fd1588e6 Mon Sep 17 00:00:00 2001 From: Ariel Ben-Yehuda Date: Tue, 26 May 2015 00:41:27 +0300 Subject: Make caching in stability work. This improves stability check performance by 90%. --- src/libsyntax/attr.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs index 755dd3bb458..3c4c4d70343 100644 --- a/src/libsyntax/attr.rs +++ b/src/libsyntax/attr.rs @@ -366,7 +366,7 @@ pub fn cfg_matches(diagnostic: &SpanHandler, cfgs: &[P], cfg: &ast::Me } /// Represents the #[deprecated] and friends attributes. -#[derive(RustcEncodable,RustcDecodable,Clone,Debug)] +#[derive(RustcEncodable, RustcDecodable, Clone, Debug, PartialEq, Eq, Hash)] pub struct Stability { pub level: StabilityLevel, pub feature: InternedString, @@ -378,7 +378,7 @@ pub struct Stability { } /// The available stability levels. -#[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Debug,Copy)] +#[derive(RustcEncodable, RustcDecodable, PartialEq, PartialOrd, Clone, Debug, Copy, Eq, Hash)] pub enum StabilityLevel { Unstable, Stable, -- cgit 1.4.1-3-g733a5