Skip to content

Commit

Permalink
refactor(ast_tools): remove dead code in AstBuilder generator (#6757)
Browse files Browse the repository at this point in the history
`ReferenceFlags` no longer appears in the AST.
  • Loading branch information
overlookmotel committed Oct 22, 2024
1 parent 46720be commit e8d3d8b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tasks/ast_tools/src/generators/ast_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,12 @@ fn default_init_field(field: &FieldDef) -> bool {
field!(scope_id: Cell<Option<ScopeId>>),
field!(symbol_id: Cell<Option<SymbolId>>),
field!(reference_id: Cell<Option<ReferenceId>>),
field!(reference_flags: ReferenceFlags),
]);
}

let ident = field.ident().expect("expected named field");
if let Some(default_type) = DEFAULT_FIELDS.get(ident.to_string().as_str()) {
*default_type == field.typ.raw()
if let Some(&default_type) = DEFAULT_FIELDS.get(ident.to_string().as_str()) {
default_type == field.typ.raw()
} else {
false
}
Expand Down

0 comments on commit e8d3d8b

Please sign in to comment.