aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-ast-lower.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-01-15 11:20:18 +0000
committerGitHub <noreply@github.com>2022-01-15 11:20:18 +0000
commitb02824c6a798a78657568e7d831bd10529d63e37 (patch)
tree83fd67a961ce521c6350e9c47bcbe3aa94965751 /gcc/rust/hir/rust-ast-lower.cc
parentb21caeb3af4313016afeb94a91956e8fc4c2656d (diff)
parent7d456b882a8f72b6fb3bdb0e71367811770b4413 (diff)
downloadgcc-b02824c6a798a78657568e7d831bd10529d63e37.zip
gcc-b02824c6a798a78657568e7d831bd10529d63e37.tar.gz
gcc-b02824c6a798a78657568e7d831bd10529d63e37.tar.bz2
Merge #874
874: Track end locus of BlockExpr r=philberty a=dafaust Capture the closing locus of a block during parsing, and remove the old hack to get the final statement locus within the block now that it is properly tracked. Fixes #864 Co-authored-by: David Faust <david.faust@oracle.com>
Diffstat (limited to 'gcc/rust/hir/rust-ast-lower.cc')
-rw-r--r--gcc/rust/hir/rust-ast-lower.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/hir/rust-ast-lower.cc b/gcc/rust/hir/rust-ast-lower.cc
index 326412b..d6f5cf2 100644
--- a/gcc/rust/hir/rust-ast-lower.cc
+++ b/gcc/rust/hir/rust-ast-lower.cc
@@ -101,7 +101,8 @@ ASTLoweringBlock::visit (AST::BlockExpr &expr)
= new HIR::BlockExpr (mapping, std::move (block_stmts),
std::unique_ptr<HIR::ExprWithoutBlock> (tail_expr),
tail_reachable, expr.get_inner_attrs (),
- expr.get_outer_attrs (), expr.get_locus ());
+ expr.get_outer_attrs (), expr.get_start_locus (),
+ expr.get_end_locus ());
terminated = block_did_terminate;
}