From: Owen Avery <powerboat9.ga...@gmail.com>

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>
---
 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 993e2d4fd2a..73c795668d9 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;
-- 
2.49.0

Reply via email to