[gcc r15-8764] gccrs: Fix an issue with ForeverStack::dfs_rib
Arthur Cohen
cohenarthur@gcc.gnu.org
Mon Mar 24 12:33:42 GMT 2025
https://gcc.gnu.org/g:c4731c1b144c4219558176f95d2fa3c46df07db2
commit r15-8764-gc4731c1b144c4219558176f95d2fa3c46df07db2
Author: Owen Avery <powerboat9.gamer@gmail.com>
Date: Fri Jan 31 23:03:03 2025 -0500
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 <powerboat9.gamer@gmail.com>
Diff:
---
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 1c83f6bda613..d0d74217b613 100644
--- a/gcc/rust/resolve/rust-forever-stack.hxx
+++ b/gcc/rust/resolve/rust-forever-stack.hxx
@@ -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>
More information about the Gcc-cvs
mailing list