-
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
ast/hir: Rename field-related structures #83188
Conversation
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.
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit d1522b3 with merge 4151b69442450bfead61718d7fa73ffd0a778bf7... |
☀️ Try build successful - checks-actions |
Queued 4151b69442450bfead61718d7fa73ffd0a778bf7 with parent 195ad48, future comparison URL. |
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 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 |
@bors r+ |
📌 Commit d1522b3 has been approved by |
☀️ Test successful - checks-actions |
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.
I always forget what
ast::Field
andast::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 ofExprKind::Struct
in preparation for #80080.