From 6508698504a2bb2e6b92b74f11d55ca4282927f4 Mon Sep 17 00:00:00 2001 From: "@mvvsmk" Date: Sun, 23 Jan 2022 19:53:39 +0530 Subject: Added location data to Match Arm and removed unused code Addresses #863 Added location data to Match arm in gcc/rust/ast/rust-expr.h and gcc/rust/hir/tree/rust-hir-expr.h Updated the respective constructors and copy constructors Updated location info for match arm in code generation in gcc/rust/backend/eust-compile-expr.cc Removed unused code in the above rust-expr.h and rust-gir-expr.h files as mentioned in the issue. Signed-off-by:M V V S Manoj Kumar --- gcc/rust/backend/rust-compile-expr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust/backend') diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc index c58d29d..3e5db29 100644 --- a/gcc/rust/backend/rust-compile-expr.cc +++ b/gcc/rust/backend/rust-compile-expr.cc @@ -274,7 +274,7 @@ CompileExpr::visit (HIR::MatchExpr &expr) rust_assert (kase_arm.get_patterns ().size () > 0); // generate implicit label - Location arm_locus = kase_arm.get_patterns ().at (0)->get_locus (); + Location arm_locus = kase_arm.get_locus (); tree case_label = ctx->get_backend ()->label ( fndecl, "" /* empty creates an artificial label */, arm_locus); -- cgit v1.1