aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.cc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2022-12-04 15:27:26 +0000
committerPhilip Herron <philip.herron@embecosm.com>2022-12-04 15:27:26 +0000
commit9da783d1b71bb5e8add0cf74527786d0e4255803 (patch)
tree3875dd8ee1757432a8aac855118a12ce748e2f21 /gcc/rust/backend/rust-compile-resolve-path.cc
parent0bf68cf5e6199ce7deb3d0744ced09dd4db1b1c9 (diff)
downloadgcc-9da783d1b71bb5e8add0cf74527786d0e4255803.zip
gcc-9da783d1b71bb5e8add0cf74527786d0e4255803.tar.gz
gcc-9da783d1b71bb5e8add0cf74527786d0e4255803.tar.bz2
Revert "rust: Remove unused variables and fix dangling references"
This reverts commit 9657c328d0cdda49b7985c3ee727781a387e128b.
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
-rw-r--r--gcc/rust/backend/rust-compile-resolve-path.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/rust/backend/rust-compile-resolve-path.cc b/gcc/rust/backend/rust-compile-resolve-path.cc
index 7becdf7..f89da2b 100644
--- a/gcc/rust/backend/rust-compile-resolve-path.cc
+++ b/gcc/rust/backend/rust-compile-resolve-path.cc
@@ -33,20 +33,20 @@ void
ResolvePathRef::visit (HIR::QualifiedPathInExpression &expr)
{
resolved = resolve (expr.get_final_segment ().get_segment (),
- expr.get_mappings (), expr.get_locus ());
+ expr.get_mappings (), expr.get_locus (), true);
}
void
ResolvePathRef::visit (HIR::PathInExpression &expr)
{
resolved = resolve (expr.get_final_segment ().get_segment (),
- expr.get_mappings (), expr.get_locus ());
+ expr.get_mappings (), expr.get_locus (), false);
}
tree
ResolvePathRef::resolve (const HIR::PathIdentSegment &final_segment,
const Analysis::NodeMapping &mappings,
- Location expr_locus)
+ Location expr_locus, bool is_qualified_path)
{
TyTy::BaseType *lookup = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (mappings.get_hirid (), &lookup);
@@ -157,8 +157,8 @@ ResolvePathRef::resolve (const HIR::PathIdentSegment &final_segment,
}
// let the query system figure it out
- tree resolved_item
- = query_compile (ref, lookup, final_segment, mappings, expr_locus);
+ tree resolved_item = query_compile (ref, lookup, final_segment, mappings,
+ expr_locus, is_qualified_path);
if (resolved_item != error_mark_node)
{
TREE_USED (resolved_item) = 1;
@@ -170,7 +170,7 @@ tree
HIRCompileBase::query_compile (HirId ref, TyTy::BaseType *lookup,
const HIR::PathIdentSegment &final_segment,
const Analysis::NodeMapping &mappings,
- Location expr_locus)
+ Location expr_locus, bool is_qualified_path)
{
HIR::Item *resolved_item = ctx->get_mappings ()->lookup_hir_item (ref);
HirId parent_block;