diff options
author | Owen Avery <powerboat9.gamer@gmail.com> | 2025-01-31 23:03:03 -0500 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-24 13:06:58 +0100 |
commit | c4731c1b144c4219558176f95d2fa3c46df07db2 (patch) | |
tree | fa6e12213ce9f6bc927f1d870c6ead3e9e32c477 /gcc/rust/resolve/rust-forever-stack.hxx | |
parent | d26828bd44bd2550c477e60d8ae64a27dd98ee0f (diff) | |
download | gcc-c4731c1b144c4219558176f95d2fa3c46df07db2.zip gcc-c4731c1b144c4219558176f95d2fa3c46df07db2.tar.gz gcc-c4731c1b144c4219558176f95d2fa3c46df07db2.tar.bz2 |
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>
Diffstat (limited to 'gcc/rust/resolve/rust-forever-stack.hxx')
-rw-r--r-- | gcc/rust/resolve/rust-forever-stack.hxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx index 1c83f6b..d0d7421 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> |