diff options
author | @mvvsmk <mvvsmanojkumar@gmail.com> | 2022-02-03 07:27:20 +0530 |
---|---|---|
committer | @mvvsmk <mvvsmanojkumar@gmail.com> | 2022-02-04 13:49:50 +0530 |
commit | b92a9b80faa4b6daeca3e94db8bcdebdeec0b859 (patch) | |
tree | 3285d1e70528eab92bd936439333cdb3cbb0dd3a /gcc/rust/parse/rust-parse-impl.h | |
parent | 6508698504a2bb2e6b92b74f11d55ca4282927f4 (diff) | |
download | gcc-b92a9b80faa4b6daeca3e94db8bcdebdeec0b859.zip gcc-b92a9b80faa4b6daeca3e94db8bcdebdeec0b859.tar.gz gcc-b92a9b80faa4b6daeca3e94db8bcdebdeec0b859.tar.bz2 |
Upated parameterised constuctor of MatchArm to take location data
Addresses issue #863
1)comment removed form rust-expr.h
2)changed partameterized constructor and static function in
rust-hir-expr.h
3)changed line 697 to pass expr.get_locus() in rust-ast-lower
4)changed parameterised constructor in rust-expr.h
5)changed line 8563 in rust-parse-impl.h to pass location data.
Signed-off-by : M V V S Manoj Kumar <mvvsmanojkumar@gmail.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 0e39e48..6d393b0 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -8560,8 +8560,9 @@ Parser<ManagedTokenSource>::parse_match_arm () // DEBUG rust_debug ("successfully parsed match arm"); - return AST::MatchArm (std::move (match_arm_patterns), std::move (guard_expr), - std::move (outer_attrs)); + return AST::MatchArm (std::move (match_arm_patterns), + lexer.peek_token ()->get_locus (), + std::move (guard_expr), std::move (outer_attrs)); } /* Parses the patterns used in a match arm. End token id is the id of the token |