aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve-path.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve-path.cc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-path.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-path.cc b/gcc/rust/resolve/rust-ast-resolve-path.cc
index a03bfb4..27f32aa 100644
--- a/gcc/rust/resolve/rust-ast-resolve-path.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-path.cc
@@ -199,7 +199,8 @@ ResolvePath::resolve_path (AST::PathInExpression *expr)
bool did_resolve_segment = resolved_node_id != UNKNOWN_NODEID;
if (did_resolve_segment)
{
- if (mappings->node_is_module (resolved_node_id))
+ if (mappings->node_is_module (resolved_node_id)
+ || mappings->node_is_crate (resolved_node_id))
{
module_scope_id = resolved_node_id;
}