From c4731c1b144c4219558176f95d2fa3c46df07db2 Mon Sep 17 00:00:00 2001 From: Owen Avery Date: Fri, 31 Jan 2025 23:03:03 -0500 Subject: [PATCH] gccrs: Fix an issue with ForeverStack::dfs_rib gcc/rust/ChangeLog: * resolve/rust-forever-stack.hxx (ForeverStack::dfs_rib): Fix const implementation. Signed-off-by: Owen Avery --- gcc/rust/resolve/rust-forever-stack.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx index 1c83f6bda61..d0d74217b61 100644 --- a/gcc/rust/resolve/rust-forever-stack.hxx +++ b/gcc/rust/resolve/rust-forever-stack.hxx @@ -638,9 +638,8 @@ tl::optional ForeverStack::dfs_rib (const ForeverStack::Node &starting_point, NodeId to_find) const { - return dfs_node (starting_point, to_find).map ([] (Node &x) -> Rib & { - return x.rib; - }); + return dfs_node (starting_point, to_find) + .map ([] (const Node &x) -> const Rib & { return x.rib; }); } template -- 2.47.2