aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse-impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r--gcc/rust/parse/rust-parse-impl.h4
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 1ad997f..769cf41 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -8512,6 +8512,8 @@ template <typename ManagedTokenSource>
AST::ClosureParam
Parser<ManagedTokenSource>::parse_closure_param ()
{
+ std::vector<AST::Attribute> outer_attrs = parse_outer_attributes ();
+
// parse pattern (which is required)
std::unique_ptr<AST::Pattern> pattern = parse_pattern ();
if (pattern == nullptr)
@@ -8537,7 +8539,7 @@ Parser<ManagedTokenSource>::parse_closure_param ()
}
}
- return AST::ClosureParam (std::move (pattern), std::move (type));
+ return AST::ClosureParam (std::move (pattern), std::move (type), std::move (outer_attrs));
}
// Parses a grouped or tuple expression (disambiguates).