aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-ast-lower-struct-field-expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/hir/rust-ast-lower-struct-field-expr.h')
-rw-r--r--gcc/rust/hir/rust-ast-lower-struct-field-expr.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-struct-field-expr.h b/gcc/rust/hir/rust-ast-lower-struct-field-expr.h
index 71c1f1f..c44c9f9 100644
--- a/gcc/rust/hir/rust-ast-lower-struct-field-expr.h
+++ b/gcc/rust/hir/rust-ast-lower-struct-field-expr.h
@@ -34,10 +34,13 @@ public:
field->accept_vis (compiler);
rust_assert (compiler.translated != nullptr);
- // compiler.mappings->insert_hir_expr (
- // compiler.translated->get_mappings ().get_crate_num (),
- // compiler.translated->get_mappings ().get_hirid (),
- // compiler.translated);
+ compiler.mappings->insert_hir_struct_field (
+ compiler.translated->get_mappings ().get_crate_num (),
+ compiler.translated->get_mappings ().get_hirid (), compiler.translated);
+ compiler.mappings->insert_location (
+ compiler.translated->get_mappings ().get_crate_num (),
+ compiler.translated->get_mappings ().get_hirid (),
+ field->get_locus_slow ());
return compiler.translated;
}
@@ -48,6 +51,8 @@ public:
void visit (AST::StructExprFieldIndexValue &field);
+ void visit (AST::StructExprFieldIdentifier &field);
+
private:
ASTLowerStructExprField () : translated (nullptr) {}