about summary refs log tree commit diff
path: root/src/test/ui/iterators/iter-sum-overflow-debug.rs
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-10-23 22:19:16 +0200
committerGitHub <noreply@github.com>2019-10-23 22:19:16 +0200
commit4a870aaee497a4cf76d8590ad465fcffbcc6cbb3 (patch)
tree917468d72264b6f947a6eea7ec9e31a2f742f740 /src/test/ui/iterators/iter-sum-overflow-debug.rs
parentc192e318cabe4e8a3ea59837bcf82e94b0d4c965 (diff)
parentc290293cf291951825b10830df4bce3bc03aabef (diff)
downloadrust-4a870aaee497a4cf76d8590ad465fcffbcc6cbb3.tar.gz
rust-4a870aaee497a4cf76d8590ad465fcffbcc6cbb3.zip
Rollup merge of #65641 - nnethercote:derive-TokenStream-Encodable-Decodable, r=petrochenkov
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.

r? @petrochenkov
Diffstat (limited to 'src/test/ui/iterators/iter-sum-overflow-debug.rs')
0 files changed, 0 insertions, 0 deletions