aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/expand/rust-macro-expand.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-10-19 14:53:43 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2022-10-19 15:01:53 +0200
commit89490980726d298311107a452bdebeb43a2ff7e6 (patch)
tree29a06a0125db7dd6a057f5ff367d00e99cade8d4 /gcc/rust/expand/rust-macro-expand.cc
parent540d896c3fa745efdc96ad34e7e5c585f9b7b93f (diff)
downloadgcc-89490980726d298311107a452bdebeb43a2ff7e6.zip
gcc-89490980726d298311107a452bdebeb43a2ff7e6.tar.gz
gcc-89490980726d298311107a452bdebeb43a2ff7e6.tar.bz2
ast: Improve Fragment API
Diffstat (limited to 'gcc/rust/expand/rust-macro-expand.cc')
-rw-r--r--gcc/rust/expand/rust-macro-expand.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/rust/expand/rust-macro-expand.cc b/gcc/rust/expand/rust-macro-expand.cc
index 3b85287..5894434 100644
--- a/gcc/rust/expand/rust-macro-expand.cc
+++ b/gcc/rust/expand/rust-macro-expand.cc
@@ -729,7 +729,7 @@ parse_many (Parser<MacroInvocLexer> &parser, TokenId &delimiter,
nodes.emplace_back (std::move (node));
}
- return AST::Fragment (std::move (nodes));
+ return AST::Fragment::complete (std::move (nodes));
}
/**
@@ -840,7 +840,7 @@ transcribe_expression (Parser<MacroInvocLexer> &parser)
{
auto expr = parser.parse_expr ();
- return AST::Fragment ({std::move (expr)});
+ return AST::Fragment::complete ({std::move (expr)});
}
/**
@@ -855,7 +855,7 @@ transcribe_type (Parser<MacroInvocLexer> &parser)
for (auto err : parser.get_errors ())
err.emit_error ();
- return AST::Fragment ({std::move (type)});
+ return AST::Fragment::complete ({std::move (type)});
}
static AST::Fragment