aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-name-resolver.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/resolve/rust-name-resolver.h')
-rw-r--r--gcc/rust/resolve/rust-name-resolver.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-name-resolver.h b/gcc/rust/resolve/rust-name-resolver.h
index 4aac7d5..2aa592c 100644
--- a/gcc/rust/resolve/rust-name-resolver.h
+++ b/gcc/rust/resolve/rust-name-resolver.h
@@ -21,6 +21,7 @@
#include "rust-system.h"
#include "rust-hir-map.h"
+#include "rust-hir-type-check.h"
namespace Rust {
namespace Resolver {
@@ -55,6 +56,15 @@ public:
CrateNum get_crate_num () const { return crate_num; }
NodeId get_node_id () const { return node_id; }
+ void iterate_decls (std::function<bool (NodeId)> cb)
+ {
+ for (auto it : decls_within_rib)
+ {
+ if (!cb (it))
+ return;
+ }
+ }
+
private:
CrateNum crate_num;
NodeId node_id;
@@ -174,6 +184,7 @@ private:
void generate_builtins ();
Analysis::Mappings *mappings;
+ TypeCheckContext *tyctx;
std::vector<AST::TypePath *> builtins;