Skip to content

Remove some unnecessary symbol interner ops - #61813

Merged
bors merged 2 commits into
rust-lang:masterfrom
matthewjasper:remove-unnecessary-symbol-ops
Jun 15, 2019
Merged

Remove some unnecessary symbol interner ops#61813
bors merged 2 commits into
rust-lang:masterfrom
matthewjasper:remove-unnecessary-symbol-ops

Conversation

@matthewjasper

Copy link
Copy Markdown
Contributor
  • Don't gensym symbols that don't need to worry about colliding with other symbols
  • Use symbol constants instead of interning string literals in a few places.
  • Don't generate a module in __register_diagnostic

r? @petrochenkov

@rust-highfiverust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2019
Comment threadsrc/librustc_resolve/lib.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a neat hashmap! { ... } macro in maplit that we could perhaps use to make this less boiler-platey?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this code is buggy (#61826), but this change shouldn't make it more buggy since the import is ty::Visibility::Invisible.

Comment threadsrc/libsyntax/ext/tt/macro_rules.rs Outdated
@petrochenkov

Copy link
Copy Markdown
Contributor

r=me with the nit addressed

@petrochenkovpetrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 14, 2019
@matthewjasper
matthewjasperforce-pushed the remove-unnecessary-symbol-ops branch from bc65021 to 5c84cd3CompareJune 14, 2019 17:55
@matthewjasper

Copy link
Copy Markdown
ContributorAuthor

@bors r=petrochenkov

@bors

bors commented Jun 14, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit 5c84cd3 has been approved by petrochenkov

@borsbors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 14, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 14, 2019
…mbol-ops, r=petrochenkov
Remove some unnecessary symbol interner ops
* Don't gensym symbols that don't need to worry about colliding with other symbols
* Use symbol constants instead of interning string literals in a few places.
* Don't generate a module in `__register_diagnostic`
r? @petrochenkov
@CentrilCentril mentioned this pull request Jun 14, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 14, 2019
…mbol-ops, r=petrochenkov
Remove some unnecessary symbol interner ops
* Don't gensym symbols that don't need to worry about colliding with other symbols
* Use symbol constants instead of interning string literals in a few places.
* Don't generate a module in `__register_diagnostic`
r? @petrochenkov
@CentrilCentril mentioned this pull request Jun 14, 2019
Centril added a commit to Centril/rust that referenced this pull request Jun 15, 2019
…mbol-ops, r=petrochenkov
Remove some unnecessary symbol interner ops
* Don't gensym symbols that don't need to worry about colliding with other symbols
* Use symbol constants instead of interning string literals in a few places.
* Don't generate a module in `__register_diagnostic`
r? @petrochenkov
@CentrilCentril mentioned this pull request Jun 15, 2019
bors added a commit that referenced this pull request Jun 15, 2019
Rollup of 6 pull requests
Successful merges:
- #61785 (note some safety concerns of raw-ptr-to-ref casts)
- #61805 (typeck: Fix ICE for blocks in repeat expr count.)
- #61813 (Remove some unnecessary symbol interner ops)
- #61824 (in which we decline to lint single-use lifetimes in `derive`d impls)
- #61844 (Change `...` to `..=` where applicable)
- #61854 (Minor cosmetic improvements to accompany PR 61825)
Failed merges:
r? @ghost
@bors
bors merged commit 5c84cd3 into rust-lang:masterJun 15, 2019
@matthewjasper
matthewjasper deleted the remove-unnecessary-symbol-ops branch July 29, 2019 19:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@matthewjasper@petrochenkov@bors@Centril@rust-highfive