aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorBen Boeckel <mathstuf@gmail.com>2021-10-25 10:10:48 -0400
committerBen Boeckel <mathstuf@gmail.com>2021-10-25 12:45:25 -0400
commit7661713e0795d37f7ce2d06d44d728b4b47fd2e3 (patch)
tree7e61d897c8844c6f54807b80ff3de38646fd55d8 /gcc/rust/ast
parent868d3125d326a6800376411fb6699d984cfa7101 (diff)
downloadgcc-7661713e0795d37f7ce2d06d44d728b4b47fd2e3.zip
gcc-7661713e0795d37f7ce2d06d44d728b4b47fd2e3.tar.gz
gcc-7661713e0795d37f7ce2d06d44d728b4b47fd2e3.tar.bz2
LifetimeWhereClauseItem: store the location of the item
Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-item.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index fb1cb09..d075a57 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -190,13 +190,14 @@ class LifetimeWhereClauseItem : public WhereClauseItem
// LifetimeBounds lifetime_bounds;
std::vector<Lifetime> lifetime_bounds; // inlined lifetime bounds
- // should this store location info?
+ Location locus;
public:
LifetimeWhereClauseItem (Lifetime lifetime,
- std::vector<Lifetime> lifetime_bounds)
+ std::vector<Lifetime> lifetime_bounds,
+ Location locus)
: lifetime (std::move (lifetime)),
- lifetime_bounds (std::move (lifetime_bounds))
+ lifetime_bounds (std::move (lifetime_bounds)), locus (locus)
{}
std::string as_string () const override;