about summary refs log tree commit diff
path: root/src/librustc/ich/impls_syntax.rs
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2017-09-14 12:29:16 +0200
committerMichael Woerister <michaelwoerister@posteo>2017-09-18 11:27:41 +0200
commite567afbc584e32df6492d1ea29a65b583ca24e57 (patch)
tree1ea1a4614991e7f7ffffdbc552c406b7783d2aab /src/librustc/ich/impls_syntax.rs
parentdd501735ac8eb38756f8a4f4da91b0b7a4fbca1b (diff)
downloadrust-e567afbc584e32df6492d1ea29a65b583ca24e57.tar.gz
rust-e567afbc584e32df6492d1ea29a65b583ca24e57.zip
incr.comp.: Initialize IGNORED_ATTRS in StableHashingContext lazily.
Diffstat (limited to 'src/librustc/ich/impls_syntax.rs')
-rw-r--r--src/librustc/ich/impls_syntax.rs5
1 files changed, 5 insertions, 0 deletions
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<StableHashingContext<'a, 'gcx, 'tcx>> for [ast::
     fn hash_stable<W: StableHasherResult>(&self,
                                           hcx: &mut StableHashingContext<'a, 'gcx, 'tcx>,
                                           hasher: &mut StableHasher<W>) {
+        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()