diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-10-25 17:01:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-25 17:01:37 +0000 |
commit | 78ed354283b17658d922029f07e4e7401039a4a3 (patch) | |
tree | ebe6e19205c16b3a0954288e3240e085c19cb569 /gcc/rust/parse/rust-parse-impl.h | |
parent | d2b12ea8895a8539281bd2a87f0e63234c3203c6 (diff) | |
parent | 7661713e0795d37f7ce2d06d44d728b4b47fd2e3 (diff) | |
download | gcc-78ed354283b17658d922029f07e4e7401039a4a3.zip gcc-78ed354283b17658d922029f07e4e7401039a4a3.tar.gz gcc-78ed354283b17658d922029f07e4e7401039a4a3.tar.bz2 |
Merge #769
769: LifetimeWhereClauseItem: store the location of the item r=philberty a=mathstuf
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
---
Fixes: #765
Here is a checklist to help you with your PR.
- \[x] GCC development requires copyright assignment or the Developer's Certificate of Origin sign-off, see https://gcc.gnu.org/contribute.html or https://gcc.gnu.org/dco.html
- \[x] Read contributing guidlines
- \[x] `make check-rust` passes locally
- \[x] Run `clang-format` (letting CI handle this)
- \[x] Added any relevant test cases to `gcc/testsuite/rust/`
I didn't find any ctor calls for the `HIR` type, but it's updated as well.
Co-authored-by: Ben Boeckel <mathstuf@gmail.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index c2d3720..14e4e80 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -3579,9 +3579,11 @@ Parser<ManagedTokenSource>::parse_lifetime_where_clause_item () std::vector<AST::Lifetime> lifetime_bounds = parse_lifetime_bounds (); // TODO: have end token passed in? + Location locus = lifetime.get_locus (); + return std::unique_ptr<AST::LifetimeWhereClauseItem> ( new AST::LifetimeWhereClauseItem (std::move (lifetime), - std::move (lifetime_bounds))); + std::move (lifetime_bounds), locus)); } // Parses a type bound where clause item. |