-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify storage of associated items in SingleASTNode
gcc/rust/ChangeLog: * ast/rust-ast-fragment.cc (Fragment::assert_single_fragment): Update. * ast/rust-ast.h (class TraitImplItem): Move definition before that of TraitItem. (class TraitItem): Inherit from TraitImplItem instead of AssociatedItem. (class SingleASTNode): Unify handling of associated items. (SingleASTNode::take_assoc_item): Move from... (SingleASTNode::take_impl_item): ...here, but leave stub calling take_assoc_item behind. (SingleASTNode::take_trait_item): Cast associated item to TraitItem. (SingleASTNode::take_trait_impl_item): Cast associated item to TraitImplItem. * ast/rust-ast.cc (SingleASTNode::SingleASTNode): Unify handling of associated items. (SingleASTNode::operator=): Likewise. (SingleASTNode::accept_vis): Likewise. (SingleASTNode::is_error): Likewise. (SingleASTNode::as_string): Likewise. * ast/rust-item.h (class Function): Remove direct inheritence from AssociatedItem. (class ConstantItem): Likewise. * ast/rust-macro.h (class MacroInvocation): Remove direct inheritence from AssociatedItem and TraitImplItem.
- Loading branch information
1 parent
972a4f0
commit 43bb497
Showing
5 changed files
with
42 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters