aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-12-13 12:53:26 -0800
committerDavid Faust <david.faust@oracle.com>2021-12-13 14:34:45 -0800
commite43a784dc89030941b0cc43309541970c59a723c (patch)
tree2249ba90aae150b0f17ad44179d35c34c2d7bc0e /gcc/rust/ast
parent0024bc2f028369b871a65ceb11b2fddfb0f9c3aa (diff)
downloadgcc-e43a784dc89030941b0cc43309541970c59a723c.zip
gcc-e43a784dc89030941b0cc43309541970c59a723c.tar.gz
gcc-e43a784dc89030941b0cc43309541970c59a723c.tar.bz2
Get rid of lambdas with AST::ArrayElemsValues
These constructs make working with the IR needlessly complicated for static analysis. Replace with simple for loops, and delete the old ArrayElemsValues::iterate () method. Fixes: #720
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-expr.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 3463f5a..7f6714a 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -996,15 +996,6 @@ public:
size_t get_num_values () const { return values.size (); }
- void iterate (std::function<bool (Expr *)> cb)
- {
- for (auto it = values.begin (); it != values.end (); it++)
- {
- if (!cb ((*it).get ()))
- return;
- }
- }
-
protected:
ArrayElemsValues *clone_array_elems_impl () const override
{