aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Dupak <dev@jakubdupak.com>2023-12-03 12:32:55 +0100
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-30 12:36:51 +0100
commitd8e8ad5493848a3b8f5883817770da2aba5d3edd (patch)
tree8bebb7e8ce86d64f30ad36428dd1635c0778739b /gcc
parentbc1a47f72de0b40a7f26372f8407c0492e10403e (diff)
downloadgcc-d8e8ad5493848a3b8f5883817770da2aba5d3edd.zip
gcc-d8e8ad5493848a3b8f5883817770da2aba5d3edd.tar.gz
gcc-d8e8ad5493848a3b8f5883817770da2aba5d3edd.tar.bz2
gccrs: ast: Lower 'for' lifetimes
gcc/rust/ChangeLog: * hir/rust-ast-lower-type.cc (ASTLoweringType::visit): For lifetimes. Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/hir/rust-ast-lower-type.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/hir/rust-ast-lower-type.cc b/gcc/rust/hir/rust-ast-lower-type.cc
index 5cea71f..a0178eb 100644
--- a/gcc/rust/hir/rust-ast-lower-type.cc
+++ b/gcc/rust/hir/rust-ast-lower-type.cc
@@ -199,6 +199,13 @@ ASTLoweringType::visit (AST::BareFunctionType &fntype)
{
bool is_variadic = false;
std::vector<HIR::LifetimeParam> lifetime_params;
+ for (auto &lifetime_param : fntype.get_for_lifetimes ())
+ {
+ auto generic_param = ASTLowerGenericParam::translate (&lifetime_param);
+ lifetime_params.push_back (
+ *static_cast<HIR::LifetimeParam *> (generic_param));
+ }
+
HIR::FunctionQualifiers qualifiers
= lower_qualifiers (fntype.get_function_qualifiers ());