Remove extern block scoping visit function, use the default visitor visit
function instead. We do not need scoping for extern block as their
element shall be visible from the extern block scope.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (DefaultResolver::visit): Remove
visitor implementation and scoping.
* resolve/rust-default-resolver.h: Remove function prototype.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
ctx.scoped (Rib::Kind::TraitOrImpl, impl.get_node_id (), inner_fn);
}
-void
-DefaultResolver::visit (AST::ExternBlock &block)
-{
- auto inner_fn = [this, &block] () {
- for (auto &item : block.get_extern_items ())
- item->accept_vis (*this);
- };
-
- ctx.scoped (Rib::Kind::Normal /* FIXME: Correct? */, block.get_node_id (),
- inner_fn);
-}
-
void
DefaultResolver::visit (AST::StructStruct &type)
{
void visit (AST::Trait &);
void visit (AST::InherentImpl &);
void visit (AST::TraitImpl &);
- void visit (AST::ExternBlock &);
// type dec nodes, which visit their fields or variants by default
void visit (AST::StructStruct &);