aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-item.h
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-12-13 13:43:28 -0800
committerDavid Faust <david.faust@oracle.com>2021-12-13 14:45:44 -0800
commit8c3ad67d19b7e74b1c89a6ad42f2bb0c5fb172e0 (patch)
treed015715eac87015e6bf8dd02a51a1fbc3bbcdb01 /gcc/rust/ast/rust-item.h
parent946069f506afba2ac03b00ad8244f1f42e0c03f1 (diff)
downloadgcc-8c3ad67d19b7e74b1c89a6ad42f2bb0c5fb172e0.zip
gcc-8c3ad67d19b7e74b1c89a6ad42f2bb0c5fb172e0.tar.gz
gcc-8c3ad67d19b7e74b1c89a6ad42f2bb0c5fb172e0.tar.bz2
Get rid of lambdas within AST::StructStruct
These constructs make working with the IR needlessly complicated for static analysis. Replace with simple for loops, and delete the old StructStruct::iterate () method. Fixes: #714
Diffstat (limited to 'gcc/rust/ast/rust-item.h')
-rw-r--r--gcc/rust/ast/rust-item.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index e319d74..16a9108 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -1975,15 +1975,6 @@ public:
std::vector<StructField> &get_fields () { return fields; }
const std::vector<StructField> &get_fields () const { return fields; }
- void iterate (std::function<bool (StructField &)> cb)
- {
- for (auto &field : fields)
- {
- if (!cb (field))
- return;
- }
- }
-
protected:
/* Use covariance to implement clone function as returning this object
* rather than base */