diff options
| author | bors <bors@rust-lang.org> | 2019-11-25 09:28:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-11-25 09:28:59 +0000 |
| commit | 582a4eaee6b3674a34aeefaa5ecad0207bac9b4b (patch) | |
| tree | 6c33a566e5fc413793dba4c935ffc7b4b969b255 /src/libsyntax_pos/source_map.rs | |
| parent | 4eee955502558a049df75b4313a60cf57c885aa6 (diff) | |
| parent | 782cc9f65c0c19ef79bd009074e09bf0394674f4 (diff) | |
| download | rust-582a4eaee6b3674a34aeefaa5ecad0207bac9b4b.tar.gz rust-582a4eaee6b3674a34aeefaa5ecad0207bac9b4b.zip | |
Auto merge of #66279 - cjgillot:hashstable, r=Zoxc
Use proc-macro to derive HashStable everywhere Hello, A second proc-macro is added to derive HashStable for crates librustc depends on. This proc-macro `HashStable_Generic` (to bikeshed) allows to decouple code and strip much of librustc's boilerplate. Still, two implementations `Span` and `TokenKind` require to be placed in librustc. The latter only depends on the `bug` macro. Advise welcome on how to sever that link. A trait `StableHasingContextLike` has been introduced at each crate root, in order to handle those implementations which require librustc's very `StableHashingContext`. This overall effort allowed to remove the `impl_stable_hash_for` macro. Each commit passes the `x.py check`. I still have to double check there was no change in the implementation.
Diffstat (limited to 'src/libsyntax_pos/source_map.rs')
| -rw-r--r-- | src/libsyntax_pos/source_map.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax_pos/source_map.rs b/src/libsyntax_pos/source_map.rs index 77d9807225e..b597fad080f 100644 --- a/src/libsyntax_pos/source_map.rs +++ b/src/libsyntax_pos/source_map.rs @@ -39,7 +39,7 @@ pub fn original_sp(sp: Span, enclosing_sp: Span) -> Span { } } -#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy)] +#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, HashStable_Generic)] pub struct Spanned<T> { pub node: T, pub span: Span, |
