aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-12-13 13:57:27 -0800
committerDavid Faust <david.faust@oracle.com>2021-12-13 14:45:45 -0800
commita9a7654d850a7140d1e0d636f2cc375308bb2c32 (patch)
treeb40ea16242ef40c829df297c9042eeb20c1d47d4 /gcc/rust/ast
parent8c3ad67d19b7e74b1c89a6ad42f2bb0c5fb172e0 (diff)
downloadgcc-a9a7654d850a7140d1e0d636f2cc375308bb2c32.zip
gcc-a9a7654d850a7140d1e0d636f2cc375308bb2c32.tar.gz
gcc-a9a7654d850a7140d1e0d636f2cc375308bb2c32.tar.bz2
Get rid of lambdas within AST::Union
These constructs make working with the IR needlessly complicated for static analysis. Replace with simple for loops, and delete the old Union::iterate () method. Fixes: #716
Diffstat (limited to 'gcc/rust/ast')
-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 16a9108..a18a8e6 100644
--- a/gcc/rust/ast/rust-item.h
+++ b/gcc/rust/ast/rust-item.h
@@ -2472,15 +2472,6 @@ public:
std::vector<StructField> &get_variants () { return variants; }
const std::vector<StructField> &get_variants () const { return variants; }
- void iterate (std::function<bool (StructField &)> cb)
- {
- for (auto &variant : variants)
- {
- if (!cb (variant))
- return;
- }
- }
-
std::vector<std::unique_ptr<GenericParam>> &get_generic_params ()
{
return generic_params;