diff options
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-toplevel.h')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve-toplevel.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-toplevel.h b/gcc/rust/resolve/rust-ast-resolve-toplevel.h index c3f5e4c..7ca8275 100644 --- a/gcc/rust/resolve/rust-ast-resolve-toplevel.h +++ b/gcc/rust/resolve/rust-ast-resolve-toplevel.h @@ -20,6 +20,8 @@ #define RUST_AST_RESOLVE_TOPLEVEL_H #include "rust-ast-resolve-base.h" +#include "rust-ast-resolve-type.h" +#include "rust-ast-resolve-implitem.h" #include "rust-ast-full.h" namespace Rust { @@ -34,8 +36,6 @@ public: item->accept_vis (resolver); }; - ~ResolveTopLevel () {} - void visit (AST::TupleStruct &struct_decl) { resolver->get_type_scope ().insert (struct_decl.get_identifier (), @@ -88,6 +88,17 @@ public: } } + void visit (AST::InherentImpl &impl_block) + { + if (!ResolveType::go (impl_block.get_type ().get (), + impl_block.get_node_id ())) + return; + + for (auto &impl_item : impl_block.get_impl_items ()) + ResolveToplevelImplItem::go (impl_item.get (), + impl_block.get_type ().get ()); + } + private: ResolveTopLevel () : ResolverBase (UNKNOWN_NODEID) {} }; |