public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8610] gccrs: ast: Lower 'for' lifetimes
@ 2024-01-30 12:01 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-30 12:01 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:d8e8ad5493848a3b8f5883817770da2aba5d3edd
commit r14-8610-gd8e8ad5493848a3b8f5883817770da2aba5d3edd
Author: Jakub Dupak <dev@jakubdupak.com>
Date: Sun Dec 3 12:32:55 2023 +0100
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>
Diff:
---
gcc/rust/hir/rust-ast-lower-type.cc | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gcc/rust/hir/rust-ast-lower-type.cc b/gcc/rust/hir/rust-ast-lower-type.cc
index 5cea71f83a23..a0178ebf490e 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 ());
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-30 12:01 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-30 12:01 [gcc r14-8610] gccrs: ast: Lower 'for' lifetimes Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).