diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-10 18:24:37 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2019-11-22 20:01:45 +0100 |
| commit | 31298b41d65093b2ea260d8fe8820da6db6dac94 (patch) | |
| tree | 2a792a21b0dcb3834272399e6827ddb2443c8d9f /src/libsyntax/lib.rs | |
| parent | 0073d3be97707b34f747c2633ac02e8c9ea89452 (diff) | |
| download | rust-31298b41d65093b2ea260d8fe8820da6db6dac94.tar.gz rust-31298b41d65093b2ea260d8fe8820da6db6dac94.zip | |
Invert implementations for TokenKind.
Also export a bunch of Token-related impls.
Diffstat (limited to 'src/libsyntax/lib.rs')
| -rw-r--r-- | src/libsyntax/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libsyntax/lib.rs b/src/libsyntax/lib.rs index 7865323f842..939e1877b4a 100644 --- a/src/libsyntax/lib.rs +++ b/src/libsyntax/lib.rs @@ -20,6 +20,7 @@ #![recursion_limit="256"] pub use errors; +use rustc_data_structures::stable_hasher::StableHasher; use rustc_data_structures::sync::Lock; use rustc_index::bit_set::GrowableBitSet; pub use rustc_data_structures::thin_vec::ThinVec; @@ -114,4 +115,6 @@ pub mod early_buffered_lints; /// 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: syntax_pos::StableHashingContextLike {} +pub trait StableHashingContextLike: syntax_pos::StableHashingContextLike { + fn hash_stable_tokenkind(&mut self, tokenkind: &token::TokenKind, hasher: &mut StableHasher); +} |
