diff options
Diffstat (limited to 'gcc/rust/parse')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 8 | ||||
-rw-r--r-- | gcc/rust/parse/rust-parse.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 3ff1229..c35595c 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -6436,7 +6436,8 @@ Parser<ManagedTokenSource>::parse_type_path_segment () } case LEFT_PAREN: { // parse type path function - AST::TypePathFunction type_path_function = parse_type_path_function (); + AST::TypePathFunction type_path_function + = parse_type_path_function (locus); if (type_path_function.is_error ()) { @@ -6462,7 +6463,7 @@ Parser<ManagedTokenSource>::parse_type_path_segment () // Parses a function call representation inside a type path. template <typename ManagedTokenSource> AST::TypePathFunction -Parser<ManagedTokenSource>::parse_type_path_function () +Parser<ManagedTokenSource>::parse_type_path_function (Location id_location) { if (!skip_token (LEFT_PAREN)) { @@ -6508,7 +6509,8 @@ Parser<ManagedTokenSource>::parse_type_path_function () std::unique_ptr<AST::Type> return_type = parse_function_return_type (); inputs.shrink_to_fit (); - return AST::TypePathFunction (std::move (inputs), std::move (return_type)); + return AST::TypePathFunction (std::move (inputs), id_location, + std::move (return_type)); } // Parses a path inside an expression that allows generic arguments. diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h index 5ee7b4e..17440d5 100644 --- a/gcc/rust/parse/rust-parse.h +++ b/gcc/rust/parse/rust-parse.h @@ -139,7 +139,7 @@ private: AST::PathIdentSegment parse_path_ident_segment (); AST::GenericArgs parse_path_generic_args (); AST::GenericArgsBinding parse_generic_args_binding (); - AST::TypePathFunction parse_type_path_function (); + AST::TypePathFunction parse_type_path_function (Location locus); AST::PathExprSegment parse_path_expr_segment (); AST::QualifiedPathInExpression // When given a pratt_parsed_loc, use it as the location of the |