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 8703ecb..445acad 100644
--- a/gcc/rust/parse/rust-parse-impl.h
+++ b/gcc/rust/parse/rust-parse-impl.h
@@ -14441,6 +14441,7 @@ Parser<ManagedTokenSource>::parse_struct_expr_struct_partial (
AST::StructBase struct_base = AST::StructBase::error ();
if (lexer.peek_token ()->get_id () == DOT_DOT)
{
+ Location dot_dot_location = lexer.peek_token ()->get_locus ();
lexer.skip_token ();
// parse required struct base expr
@@ -14458,7 +14459,8 @@ Parser<ManagedTokenSource>::parse_struct_expr_struct_partial (
// DEBUG:
rust_debug ("struct/enum expr - parsed and validated base expr");
- struct_base = AST::StructBase (std::move (base_expr));
+ struct_base
+ = AST::StructBase (std::move (base_expr), dot_dot_location);
// DEBUG:
rust_debug ("assigned struct base to new struct base ");