diff options
| author | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-01-09 15:20:56 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <nnethercote@mozilla.com> | 2019-01-14 09:10:26 +1100 |
| commit | 28966e1a7ac509cebac4595e96f8d053b30fb946 (patch) | |
| tree | 9c8098c50fb97a0f61c860537ae10be7f13afa72 /src/test/ui/thinlto | |
| parent | 2cf736f76563f054aecd84207b39114c6fceb8ed (diff) | |
| download | rust-28966e1a7ac509cebac4595e96f8d053b30fb946.tar.gz rust-28966e1a7ac509cebac4595e96f8d053b30fb946.zip | |
Remove `TokenStream::Tree` variant.
`TokenStream::Stream` can represent a token stream containing any number of token trees. `TokenStream::Tree` is the special case representing a single token tree. The latter doesn't occur all that often dynamically, so this commit removes it, which simplifies the code quite a bit. This change has mixed performance effects. - The size of `TokenStream` drops from 32 bytes to 8 bytes, and there is one less case for all the match statements. - The conversion of a `TokenTree` to a `TokenStream` now requires two allocations, for the creation of a single element Lrc<Vec<_>>. (But a subsequent commit in this PR will reduce the main source of such conversions.)
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
