diff options
author | Kushal Pal <kushalpal109@gmail.com> | 2024-01-24 17:03:09 +0530 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2024-02-07 12:40:23 +0100 |
commit | 4287f316e48398832aae30e288af887198206c68 (patch) | |
tree | 8d6790d21a16b7d427441fa170e5811e75bced0f /gcc/rust/expand | |
parent | 72a0554c7a269efeb6bb5462c3968f40fdf88fc2 (diff) | |
download | gcc-4287f316e48398832aae30e288af887198206c68.zip gcc-4287f316e48398832aae30e288af887198206c68.tar.gz gcc-4287f316e48398832aae30e288af887198206c68.tar.bz2 |
gccrs: Use AssociatedItem in place of TraitItem
gcc/rust/ChangeLog:
* ast/rust-ast.h: Replace TraitItem with AssociatedItem.
* ast/rust-item.h (class Trait): Likewise.
* expand/rust-expand-visitor.cc (ExpandVisitor::visit):
Likewise.
* parse/rust-parse-impl.h (Parser::parse_trait): Likewise.
* parse/rust-parse.h: Likewise.
Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
Diffstat (limited to 'gcc/rust/expand')
-rw-r--r-- | gcc/rust/expand/rust-expand-visitor.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/expand/rust-expand-visitor.cc b/gcc/rust/expand/rust-expand-visitor.cc index dad2417..bc0149c 100644 --- a/gcc/rust/expand/rust-expand-visitor.cc +++ b/gcc/rust/expand/rust-expand-visitor.cc @@ -903,7 +903,8 @@ ExpandVisitor::visit (AST::Trait &trait) expander.push_context (MacroExpander::ContextType::TRAIT); - std::function<std::unique_ptr<AST::TraitItem> (AST::SingleASTNode)> extractor + std::function<std::unique_ptr<AST::AssociatedItem> (AST::SingleASTNode)> + extractor = [] (AST::SingleASTNode node) { return node.take_trait_item (); }; expand_macro_children (MacroExpander::ContextType::TRAIT, |