From e567afbc584e32df6492d1ea29a65b583ca24e57 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Thu, 14 Sep 2017 12:29:16 +0200 Subject: incr.comp.: Initialize IGNORED_ATTRS in StableHashingContext lazily. --- src/librustc/ich/impls_syntax.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/librustc/ich/impls_syntax.rs') diff --git a/src/librustc/ich/impls_syntax.rs b/src/librustc/ich/impls_syntax.rs index a75527c14bd..4e3caca2b61 100644 --- a/src/librustc/ich/impls_syntax.rs +++ b/src/librustc/ich/impls_syntax.rs @@ -169,6 +169,11 @@ impl<'a, 'gcx, 'tcx> HashStable> for [ast:: fn hash_stable(&self, hcx: &mut StableHashingContext<'a, 'gcx, 'tcx>, hasher: &mut StableHasher) { + if self.len() == 0 { + self.len().hash_stable(hcx, hasher); + return + } + // Some attributes are always ignored during hashing. let filtered: AccumulateVec<[&ast::Attribute; 8]> = self .iter() -- cgit 1.4.1-3-g733a5