diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-11 12:31:31 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2021-03-11 12:31:31 +0100 |
| commit | 34e92bbf65aa28a8192dfc0ca1edaaee95d52b37 (patch) | |
| tree | 2c7410aac9b7fd6216306324fa435e723e1c83f8 /compiler/rustc_span/src | |
| parent | fe2d728e62d01cdf80d92f5f4d6ff5eb6ac6d10f (diff) | |
| download | rust-34e92bbf65aa28a8192dfc0ca1edaaee95d52b37.tar.gz rust-34e92bbf65aa28a8192dfc0ca1edaaee95d52b37.zip | |
Hash SyntaxContext first.
Diffstat (limited to 'compiler/rustc_span/src')
| -rw-r--r-- | compiler/rustc_span/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs index 1a2e87d28ac..6030c8a86d9 100644 --- a/compiler/rustc_span/src/lib.rs +++ b/compiler/rustc_span/src/lib.rs @@ -1902,9 +1902,10 @@ where return; } + self.ctxt().hash_stable(ctx, hasher); + if self.is_dummy() { Hash::hash(&TAG_INVALID_SPAN, hasher); - self.ctxt().hash_stable(ctx, hasher); return; } @@ -1917,7 +1918,6 @@ where Some(pos) => pos, None => { Hash::hash(&TAG_INVALID_SPAN, hasher); - span.ctxt.hash_stable(ctx, hasher); return; } }; @@ -1944,7 +1944,6 @@ where let len = (span.hi - span.lo).0; Hash::hash(&col_line, hasher); Hash::hash(&len, hasher); - span.ctxt.hash_stable(ctx, hasher); } } |
