[PATCH 1/3] Use location when lowering TupleField

Mark Wielaard mark@klomp.org
Sun Aug 29 01:02:05 GMT 2021


---
 gcc/rust/hir/rust-ast-lower-stmt.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/gcc/rust/hir/rust-ast-lower-stmt.h b/gcc/rust/hir/rust-ast-lower-stmt.h
index 1e72c8a2023..fdd5041d602 100644
--- a/gcc/rust/hir/rust-ast-lower-stmt.h
+++ b/gcc/rust/hir/rust-ast-lower-stmt.h
@@ -133,12 +133,10 @@ public:
 				     mappings->get_next_localdef_id (
 				       crate_num));
 
-      // FIXME
-      // AST::TupleField is missing Location info
-      Location field_locus;
       HIR::TupleField translated_field (mapping,
 					std::unique_ptr<HIR::Type> (type), vis,
-					field_locus, field.get_outer_attrs ());
+					field.get_locus (),
+					field.get_outer_attrs ());
       fields.push_back (std::move (translated_field));
       return true;
     });
-- 
2.32.0



More information about the Gcc-rust mailing list