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. |
||
|---|---|---|
| .. | ||
| ast | ||
| attr | ||
| diagnostics | ||
| expand | ||
| feature_gate | ||
| util | ||
| ast.rs | ||
| build.rs | ||
| Cargo.toml | ||
| early_buffered_lints.rs | ||
| entry.rs | ||
| lib.rs | ||
| mut_visit.rs | ||
| ptr.rs | ||
| README.md | ||
| sess.rs | ||
| show_span.rs | ||
| token.rs | ||
| tokenstream.rs | ||
| visit.rs | ||
The syntax crate contains those things concerned purely with syntax
– that is, the AST ("abstract syntax tree"), parser, pretty-printer,
lexer, macro expander, and utilities for traversing ASTs.
For more information about how these things work in rustc, see the rustc guide: