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

ast/hir: Rename field-related structures #83188

Merged
merged 2 commits into from
Mar 17, 2021
Merged

Conversation

petrochenkov
Copy link
Contributor

I always forget what ast::Field and ast::StructField mean despite working with AST for long time, so this PR changes the naming to less confusing and more consistent.

  • StructField -> FieldDef ("field definition")
  • Field -> ExprField ("expression field", not "field expression")
  • FieldPat -> PatField ("pattern field", not "field pattern")

Various visiting and other methods working with the fields are renamed correspondingly too.

The second commit reduces the size of ExprKind by boxing fields of ExprKind::Struct in preparation for #80080.

StructField -> FieldDef ("field definition")
Field -> ExprField ("expression field", not "field expression")
FieldPat -> PatField ("pattern field", not "field pattern")

Also rename visiting and other methods working on them.
@rust-highfive
Copy link
Collaborator

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 16, 2021
@joshtriplett
Copy link
Member

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 16, 2021
@bors
Copy link
Contributor

bors commented Mar 16, 2021

⌛ Trying commit d1522b3 with merge 4151b69442450bfead61718d7fa73ffd0a778bf7...

@bors
Copy link
Contributor

bors commented Mar 16, 2021

☀️ Try build successful - checks-actions
Build commit: 4151b69442450bfead61718d7fa73ffd0a778bf7 (4151b69442450bfead61718d7fa73ffd0a778bf7)

@rust-timer
Copy link
Collaborator

Queued 4151b69442450bfead61718d7fa73ffd0a778bf7 with parent 195ad48, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (4151b69442450bfead61718d7fa73ffd0a778bf7): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never
@rustbot label: +S-waiting-on-review -S-waiting-on-perf

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 16, 2021
@lcnr
Copy link
Contributor

lcnr commented Mar 16, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2021

📌 Commit d1522b3 has been approved by lcnr

@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 Mar 16, 2021
@bors
Copy link
Contributor

bors commented Mar 17, 2021

⌛ Testing commit d1522b3 with merge b4adc21...

@bors
Copy link
Contributor

bors commented Mar 17, 2021

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing b4adc21 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 17, 2021
@bors bors merged commit b4adc21 into rust-lang:master Mar 17, 2021
@rustbot rustbot added this to the 1.52.0 milestone Mar 17, 2021
flip1995 pushed a commit to flip1995/rust that referenced this pull request Mar 25, 2021
ast/hir: Rename field-related structures

I always forget what `ast::Field` and `ast::StructField` mean despite working with AST for long time, so this PR changes the naming to less confusing and more consistent.

- `StructField` -> `FieldDef` ("field definition")
- `Field` -> `ExprField` ("expression field", not "field expression")
- `FieldPat` -> `PatField` ("pattern field", not "field pattern")

Various visiting and other methods working with the fields are renamed correspondingly too.

The second commit reduces the size of `ExprKind` by boxing fields of `ExprKind::Struct` in preparation for rust-lang#80080.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: 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.

7 participants