https://gcc.gnu.org/g:f220fe8cf73f56421f2f5659054006e38c3cd2b1

commit f220fe8cf73f56421f2f5659054006e38c3cd2b1
Author: Owen Avery <powerboat9.ga...@gmail.com>
Date:   Thu Apr 17 19:23:12 2025 -0400

    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 <powerboat9.ga...@gmail.com>

Diff:
---
 gcc/rust/resolve/rust-forever-stack.hxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/rust/resolve/rust-forever-stack.hxx 
b/gcc/rust/resolve/rust-forever-stack.hxx
index e9024b564ca7..947b72fc21f3 100644
--- a/gcc/rust/resolve/rust-forever-stack.hxx
+++ b/gcc/rust/resolve/rust-forever-stack.hxx
@@ -676,7 +676,7 @@ ForeverStack<N>::resolve_path (
                                     insert_segment_resolution);
          })
        .and_then ([this, &segments, &insert_segment_resolution] (
-                    Node final_node) -> tl::optional<Rib::Definition> {
+                    Node &final_node) -> tl::optional<Rib::Definition> {
          // leave resolution within impl blocks to type checker
          if (final_node.rib.kind == Rib::Kind::TraitOrImpl)
            return tl::nullopt;

Reply via email to