diff options
author | David Faust <david.faust@oracle.com> | 2021-12-13 13:20:02 -0800 |
---|---|---|
committer | David Faust <david.faust@oracle.com> | 2021-12-13 14:45:44 -0800 |
commit | 946069f506afba2ac03b00ad8244f1f42e0c03f1 (patch) | |
tree | 0abcb908640348e6128499e0ad99715c12258f93 /gcc/rust/ast | |
parent | e43a784dc89030941b0cc43309541970c59a723c (diff) | |
download | gcc-946069f506afba2ac03b00ad8244f1f42e0c03f1.zip gcc-946069f506afba2ac03b00ad8244f1f42e0c03f1.tar.gz gcc-946069f506afba2ac03b00ad8244f1f42e0c03f1.tar.bz2 |
Get rid of lambdas within AST::TupleStruct
These constructs make working with the IR needlessly complicated for
static analysis. Replace with simple for loops, and delete the old
TupleStruct::iterate () method.
Fixes: #715
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r-- | gcc/rust/ast/rust-item.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h index f952dcc..e319d74 100644 --- a/gcc/rust/ast/rust-item.h +++ b/gcc/rust/ast/rust-item.h @@ -2110,15 +2110,6 @@ public: std::vector<TupleField> &get_fields () { return fields; } const std::vector<TupleField> &get_fields () const { return fields; } - void iterate (std::function<bool (TupleField &)> cb) - { - for (auto &field : fields) - { - if (!cb (field)) - return; - } - } - protected: /* Use covariance to implement clone function as returning this object * rather than base */ |