aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-expr.cc
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2024-10-21 18:02:48 -0400
committerP-E-P <32375388+P-E-P@users.noreply.github.com>2025-02-03 10:46:41 +0000
commita4a3183322dc195b3f235618d28ddca3e320a5fa (patch)
tree6402d72c8c090990f0d278678a8189f3ce92c70a /gcc/rust/backend/rust-compile-expr.cc
parent4a053730c5c880984be1a7f8b6cfb19b62aa3331 (diff)
downloadgcc-a4a3183322dc195b3f235618d28ddca3e320a5fa.zip
gcc-a4a3183322dc195b3f235618d28ddca3e320a5fa.tar.gz
gcc-a4a3183322dc195b3f235618d28ddca3e320a5fa.tar.bz2
nr2.0: Remove accidental copies of resolver
gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::generate_closure_function): Take NameResolutionContext by reference instead of by value. * backend/rust-compile-item.cc (CompileItem::visit): Likewise. * backend/rust-compile-resolve-path.cc (ResolvePathRef::resolve): Likewise. * checks/lints/rust-lint-marklive.cc (MarkLive::find_ref_node_id): Likewise. * typecheck/rust-hir-type-check-enumitem.cc (TypeCheckEnumItem::visit): Likewise. * typecheck/rust-hir-type-check-implitem.cc (TypeCheckImplItem::visit): Likewise. * typecheck/rust-hir-type-check-item.cc (TypeCheckItem::visit): Likewise. * typecheck/rust-hir-type-check-path.cc (TypeCheckExpr::resolve_root_path): Likewise. * typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path): Likewise. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/backend/rust-compile-expr.cc')
-rw-r--r--gcc/rust/backend/rust-compile-expr.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc
index 7938330..a72156b 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -2453,7 +2453,7 @@ CompileExpr::generate_closure_function (HIR::ClosureExpr &expr,
auto body_mappings = function_body.get_mappings ();
if (flag_name_resolution_2_0)
{
- auto nr_ctx
+ auto &nr_ctx
= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();
auto candidate = nr_ctx.values.to_rib (body_mappings.get_nodeid ());