diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-09-26 18:54:39 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2019-09-28 11:47:36 -0400 |
| commit | 14a5aefb01bb4f18749ab56cd9fd37bf93c86a37 (patch) | |
| tree | 01239699d8cb998460c98b985f52df26a9768398 /src/libsyntax_pos | |
| parent | f60e58e57580d47e82a374bad73214b6bfec085a (diff) | |
| download | rust-14a5aefb01bb4f18749ab56cd9fd37bf93c86a37.tar.gz rust-14a5aefb01bb4f18749ab56cd9fd37bf93c86a37.zip | |
Switch over all StableHash impls to new format
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/lib.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index ca177eb4a36..674f17de618 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -1067,14 +1067,14 @@ impl SourceFile { normalize_newlines(&mut src); let src_hash = { - let mut hasher: StableHasher<u128> = StableHasher::new(); + let mut hasher: StableHasher = StableHasher::new(); hasher.write(src.as_bytes()); - hasher.finish() + hasher.finish::<u128>() }; let name_hash = { - let mut hasher: StableHasher<u128> = StableHasher::new(); + let mut hasher: StableHasher = StableHasher::new(); name.hash(&mut hasher); - hasher.finish() + hasher.finish::<u128>() }; let end_pos = start_pos.to_usize() + src.len(); if end_pos > u32::max_value() as usize { @@ -1120,10 +1120,10 @@ impl SourceFile { // Check that no-one else have provided the source while we were getting it if *external_src == ExternalSource::AbsentOk { if let Some(src) = src { - let mut hasher: StableHasher<u128> = StableHasher::new(); + let mut hasher: StableHasher = StableHasher::new(); hasher.write(src.as_bytes()); - if hasher.finish() == self.src_hash { + if hasher.finish::<u128>() == self.src_hash { *external_src = ExternalSource::Present(src); return true; } |
