Skip to content

Commit

Permalink
Fix an issue with ForeverStack::dfs_rib
Browse files Browse the repository at this point in the history
gcc/rust/ChangeLog:

	* resolve/rust-forever-stack.hxx
	(ForeverStack::dfs_rib): Fix const implementation.

Signed-off-by: Owen Avery <[email protected]>
  • Loading branch information
powerboat9 authored and CohenArthur committed Feb 2, 2025
1 parent 761d424 commit af2fdca
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions gcc/rust/resolve/rust-forever-stack.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -638,9 +638,8 @@ tl::optional<const Rib &>
ForeverStack<N>::dfs_rib (const ForeverStack<N>::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 <Namespace N>
Expand Down

0 comments on commit af2fdca

Please sign in to comment.