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

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

    gccrs: 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 993e2d4fd2ab..73c795668d9a 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