diff --git a/src/librustc_data_structures/stable_hasher.rs b/src/librustc_data_structures/stable_hasher.rs index c777f1fa829..fa573907d4c 100644 --- a/src/librustc_data_structures/stable_hasher.rs +++ b/src/librustc_data_structures/stable_hasher.rs @@ -324,9 +324,7 @@ impl HashStable for SmallVec<[A; 1]> where A: HashStable { fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) { - for item in self { - item.hash_stable(ctx, hasher); - } + (&self[..]).hash_stable(ctx, hasher); } }