Skip to content

Commit

Permalink
type-check: Remove unused capture in nr2.0
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* typecheck/rust-hir-type-check-type.cc (TypeCheckType::resolve_root_path):
	Remove unused capture in lambda.
  • Loading branch information
CohenArthur committed Dec 5, 2024
1 parent 7208108 commit 1995c83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gcc/rust/typecheck/rust-hir-type-check-type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "rust-hir-type-check-type.h"
#include "options.h"
#include "optional.h"
#include "rust-hir-map.h"
#include "rust-hir-trait-resolve.h"
#include "rust-hir-type-check-expr.h"
#include "rust-hir-path-probe.h"
Expand Down Expand Up @@ -394,11 +395,10 @@ TypeCheckType::resolve_root_path (HIR::TypePath &path, size_t *offset,
{
auto nr_ctx
= Resolver2_0::ImmutableNameResolutionContext::get ().resolver ();

// assign the ref_node_id if we've found something
nr_ctx.lookup (path.get_mappings ().get_nodeid ())
.map ([&ref_node_id, &path] (NodeId resolved) {
ref_node_id = resolved;
});
.map ([&ref_node_id] (NodeId resolved) { ref_node_id = resolved; });
}
else if (!resolver->lookup_resolved_name (ast_node_id, &ref_node_id))
resolver->lookup_resolved_type (ast_node_id, &ref_node_id);
Expand Down

0 comments on commit 1995c83

Please sign in to comment.