From f220fe8cf73f56421f2f5659054006e38c3cd2b1 Mon Sep 17 00:00:00 2001 From: Owen Avery Date: Thu, 17 Apr 2025 19:23:12 -0400 Subject: nr2.0: Remove unnecessary copy of Node gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx (ForeverStack::resolve_path): Pass instance of Node to lambda by reference instead of by value. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-forever-stack.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/rust/resolve') diff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx index e9024b5..947b72f 100644 --- a/gcc/rust/resolve/rust-forever-stack.hxx +++ b/gcc/rust/resolve/rust-forever-stack.hxx @@ -676,7 +676,7 @@ ForeverStack::resolve_path ( insert_segment_resolution); }) .and_then ([this, &segments, &insert_segment_resolution] ( - Node final_node) -> tl::optional { + Node &final_node) -> tl::optional { // leave resolution within impl blocks to type checker if (final_node.rib.kind == Rib::Kind::TraitOrImpl) return tl::nullopt; -- cgit v1.1