From: Jakub Dupak Date: Sun, 3 Dec 2023 11:32:55 +0000 (+0100) Subject: gccrs: ast: Lower 'for' lifetimes X-Git-Tag: basepoints/gcc-15~1529 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d8e8ad5493848a3b8f5883817770da2aba5d3edd;p=thirdparty%2Fgcc.git gccrs: ast: Lower 'for' lifetimes gcc/rust/ChangeLog: * hir/rust-ast-lower-type.cc (ASTLoweringType::visit): For lifetimes. Signed-off-by: Jakub Dupak --- 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 lifetime_params; + for (auto &lifetime_param : fntype.get_for_lifetimes ()) + { + auto generic_param = ASTLowerGenericParam::translate (&lifetime_param); + lifetime_params.push_back ( + *static_cast (generic_param)); + } + HIR::FunctionQualifiers qualifiers = lower_qualifiers (fntype.get_function_qualifiers ());