aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc')
-rw-r--r--gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
index 3122d41..5012041 100644
--- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
+++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc
@@ -26,6 +26,13 @@ namespace Rust {
namespace Resolver2_0 {
void
+GlobbingVisitor::go (AST::Module *module)
+{
+ for (auto &i : module->get_items ())
+ visit (i);
+}
+
+void
GlobbingVisitor::visit (AST::Module &module)
{
if (module.get_visibility ().is_public ())
@@ -399,7 +406,7 @@ TopLevel::handle_use_glob (AST::SimplePath glob)
return false;
GlobbingVisitor gvisitor (ctx);
- gvisitor.visit (*result.value ());
+ gvisitor.go (result.value ());
return true;
}