Commit graph

4 commits

Author SHA1 Message Date
Mazdak Farrokhzad
9a88364525 syntactically allow visibility on trait item & enum variant 2019-11-11 06:33:09 +01:00
Nicholas Nethercote
c290293cf2 Derive Rustc{En,De}codable for TokenStream.
`TokenStream` used to be a complex type, but it is now just a newtype
around a `Lrc<Vec<TreeAndJoint>>`. Currently it uses custom encoding
that discards the `IsJoint` and custom decoding that adds `NonJoint`
back in for every token tree. This requires building intermediate
`Vec<TokenTree>`s.

This commit makes `TokenStream` derive `Rustc{En,De}codable`. This
simplifies the code, and avoids the creation of the intermediate
vectors, saving up to 3% on various benchmarks. It also changes the AST
JSON output in one test.
2019-10-21 06:54:41 +11:00
varkor
0573af0eb2 Fix AST JSON output test 2019-09-26 21:39:56 +01:00
Matthew Jasper
3d718037dc Add default serialization for Idents
Add tests for -Zast-json and -Zast-json-noexpand, which need this impl.
2019-08-27 23:02:22 +01:00