-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Option
from TokenStream
#65261
Remove Option
from TokenStream
#65261
Conversation
@bors try @rust-timer queue |
⌛ Trying commit 2ab66c543bea042971bb502c19471ec6827c625e with merge 310497755aba58c78b873085b89172ca0a8b0cdc... |
☀️ Try build successful - checks-azure |
This perf seems to be missing from perf.rlo queue, maybe bot was down while you were scheduling. |
@rust-timer build 310497755aba58c78b873085b89172ca0a8b0cdc |
Queued 310497755aba58c78b873085b89172ca0a8b0cdc with parent aa45e03, future comparison URL. |
Finished benchmarking try commit 310497755aba58c78b873085b89172ca0a8b0cdc, comparison URL. |
Two hours later, I get "could not find commit by bound Commit("aa45e032d96f1785581d336170e6dc35d5f1cb65"), start=true" when I visit the link. rust-timer is really struggling lately :( |
I guess timer bot doesn't check whether TryParent has finished. Results are available but it's mostly noise. |
Thanks for letting me know. Noise is good in this case; it shows that it doesn't hurt performance. |
LGTM, just a couple of nits. |
It means an allocation is required to create an empty `TokenStream`, but all other operations are simpler and marginally faster due to not having to check for `None`. Overall it simplifies the code for a negligible performance effect. The commit also removes `TokenStream::empty` by implementing `Default`, which is now possible.
This avoids some unnecessary creation of empty token streams.
2ab66c5
to
18b48bf
Compare
@petrochenkov: New code is up, with nits addressed. |
@bors r+ |
📌 Commit 18b48bf has been approved by |
…eam, r=petrochenkov Remove `Option` from `TokenStream` A code simplification. r? @petrochenkov
…eam, r=petrochenkov Remove `Option` from `TokenStream` A code simplification. r? @petrochenkov
Rollup of 10 pull requests Successful merges: - #65170 (rustc_metadata: Privatize private code and remove dead code) - #65260 (Optimize `LexicalResolve::expansion`.) - #65261 (Remove `Option` from `TokenStream`) - #65332 (std::fmt: reorder docs) - #65340 (Several changes to the codegen backend organization) - #65365 (Include const generic arguments in metadata) - #65398 (Bring attention to suggestions when the only difference is capitalization) - #65410 (syntax: add parser recovery for intersection- / and-patterns `p1 @ p2`) - #65415 (Remove an outdated test output file) - #65416 (Minor sync changes) Failed merges: r? @ghost
A code simplification.
r? @petrochenkov