about summary refs log tree commit diff
path: root/src/libsyntax_pos
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2019-11-10 17:19:08 +0100
committerCamille GILLOT <gillot.camille@gmail.com>2019-11-22 19:56:20 +0100
commit1de5fdb5babf74f729b008585a8aaf16110bb1fd (patch)
tree8e1f1b6f69cf4e20a435c1b53dab59803dee8406 /src/libsyntax_pos
parent3e969e070fcb0d8fab5d2c812edad12490fe8c1d (diff)
downloadrust-1de5fdb5babf74f729b008585a8aaf16110bb1fd.tar.gz
rust-1de5fdb5babf74f729b008585a8aaf16110bb1fd.zip
Add StableHashingContextLike to HashStable_Generic derive.
Diffstat (limited to 'src/libsyntax_pos')
-rw-r--r--src/libsyntax_pos/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs
index 720ace90324..d11ef5fcab2 100644
--- a/src/libsyntax_pos/lib.rs
+++ b/src/libsyntax_pos/lib.rs
@@ -1562,3 +1562,8 @@ fn lookup_line(lines: &[BytePos], pos: BytePos) -> isize {
         Err(line) => line as isize - 1
     }
 }
+
+/// Requirements for a `StableHashingContext` to be used in this crate.
+/// This is a hack to allow using the `HashStable_Generic` derive macro
+/// instead of implementing everything in librustc.
+pub trait StableHashingContextLike {}