Skip to content
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

Streamline AttrAnnotatedTokenStream #101602

Merged
merged 6 commits into from
Sep 13, 2022
Merged

Conversation

nnethercote
Copy link
Contributor

And into `AttrAnnotatedTokenTree::Token`.

PR rust-lang#99887 did the same thing for `TokenStream`.
These two type names are long and have long matching prefixes. I find
them hard to read, especially in combinations like
`AttrAnnotatedTokenStream::new(vec![AttrAnnotatedTokenTree::Token(..)])`.

This commit renames them as `AttrToken{Stream,Tree}`.
@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Sep 9, 2022
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 9, 2022
@nnethercote
Copy link
Contributor Author

Best reviewed one commit at a time.

The `AttrTokenStream` is always immediately turned into a `TokenStream`.
`To` is better than `Create` for indicating that this is a non-consuming
conversion, rather than creating something out of nothing.

And the addition of `Attr` is because the current names makes them sound
like they relate to `TokenStream`, but really they relate to
`AttrTokenStream`.
@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Sep 12, 2022

📌 Commit d2df07c has been approved by petrochenkov

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 12, 2022

🌲 The tree is currently closed for pull requests below priority 1000. This pull request will be tested once the tree is reopened.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 12, 2022
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 12, 2022
…rochenkov

Streamline `AttrAnnotatedTokenStream`

r? `@petrochenkov`
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Sep 13, 2022
…rochenkov

Streamline `AttrAnnotatedTokenStream`

r? ``@petrochenkov``
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 13, 2022
Rollup of 5 pull requests

Successful merges:

 - rust-lang#101602 (Streamline `AttrAnnotatedTokenStream`)
 - rust-lang#101690 (Avoid `Iterator::last`)
 - rust-lang#101700 (A `SubstitutionPart` is not considered a deletion if it replaces nothing with nothing)
 - rust-lang#101745 (Fix typo in concat_bytes documentation)
 - rust-lang#101748 (rustdoc: remove redundant CSS `#source-sidebar, #sidebar-toggle`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit db75d7e into rust-lang:master Sep 13, 2022
@rustbot rustbot added this to the 1.65.0 milestone Sep 13, 2022
@nnethercote nnethercote deleted the AttrTokenStream branch September 13, 2022 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants