aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-type.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-type.cc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-type.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc
index df1e7ee..c0e6752 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-type.cc
@@ -84,7 +84,7 @@ bool
ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
{
auto resolver = Resolver::get ();
- auto mappings = Analysis::Mappings::get ();
+ auto &mappings = Analysis::Mappings::get ();
NodeId module_scope_id = resolver->peek_current_module_scope ();
NodeId previous_resolved_node_id = module_scope_id;
@@ -199,8 +199,8 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
&& previous_resolved_node_id == module_scope_id)
{
tl::optional<CanonicalPath &> resolved_child
- = mappings->lookup_module_child (module_scope_id,
- ident_seg.as_string ());
+ = mappings.lookup_module_child (module_scope_id,
+ ident_seg.as_string ());
if (resolved_child.has_value ())
{
NodeId resolved_node = resolved_child->get_node_id ();
@@ -231,8 +231,8 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
bool did_resolve_segment = resolved_node_id != UNKNOWN_NODEID;
if (did_resolve_segment)
{
- if (mappings->node_is_module (resolved_node_id)
- || mappings->node_is_crate (resolved_node_id))
+ if (mappings.node_is_module (resolved_node_id)
+ || mappings.node_is_crate (resolved_node_id))
{
module_scope_id = resolved_node_id;
}
@@ -377,7 +377,7 @@ ResolveTypeToCanonicalPath::visit (AST::TypePath &path)
return;
const CanonicalPath *type_path = nullptr;
- if (mappings->lookup_canonical_path (resolved_node, &type_path))
+ if (mappings.lookup_canonical_path (resolved_node, &type_path))
{
auto &final_seg = path.get_segments ().back ();
switch (final_seg->get_type ())