File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -1148,17 +1148,19 @@ Mappings::lookup_module_children (NodeId module)
1148
1148
}
1149
1149
1150
1150
void
1151
- Mappings::insert_ast_module (AST::Module * module )
1151
+ Mappings::insert_glob_container (AST::Item *container )
1152
1152
{
1153
- rust_assert (modules.find (module ->get_node_id ()) == modules.end ());
1154
- modules[module ->get_node_id ()] = module ;
1153
+ rust_assert (glob_containers.find (container->get_node_id ())
1154
+ == glob_containers.end ());
1155
+
1156
+ glob_containers[container->get_node_id ()] = container;
1155
1157
}
1156
1158
1157
- tl::optional<AST::Module *>
1158
- Mappings::lookup_ast_module (NodeId id)
1159
+ tl::optional<AST::Item *>
1160
+ Mappings::lookup_glob_container (NodeId id)
1159
1161
{
1160
- auto it = modules .find (id);
1161
- if (it == modules .end ())
1162
+ auto it = glob_containers .find (id);
1163
+ if (it == glob_containers .end ())
1162
1164
return tl::nullopt;
1163
1165
1164
1166
return {it->second };
Original file line number Diff line number Diff line change @@ -321,8 +321,8 @@ class Mappings
321
321
void insert_visibility (NodeId id, Privacy::ModuleVisibility visibility);
322
322
tl::optional<Privacy::ModuleVisibility &> lookup_visibility (NodeId id);
323
323
324
- void insert_ast_module (AST::Module *);
325
- tl::optional<AST::Module *> lookup_ast_module (NodeId id);
324
+ void insert_glob_container (AST::Item *);
325
+ tl::optional<AST::Item *> lookup_glob_container (NodeId id);
326
326
void insert_module_child (NodeId module , NodeId child);
327
327
tl::optional<std::vector<NodeId> &> lookup_module_children (NodeId module );
328
328
@@ -436,7 +436,7 @@ class Mappings
436
436
std::map<NodeId, std::vector<NodeId>> module_child_map;
437
437
std::map<NodeId, std::vector<Resolver::CanonicalPath>> module_child_items;
438
438
std::map<NodeId, NodeId> child_to_parent_module_map;
439
- std::map<NodeId, AST::Module *> modules ;
439
+ std::map<NodeId, AST::Item *> glob_containers ;
440
440
441
441
// AST mappings
442
442
std::map<NodeId, AST::Item *> ast_item_mappings;
You can’t perform that action at this time.
0 commit comments