From 8c3ad67d19b7e74b1c89a6ad42f2bb0c5fb172e0 Mon Sep 17 00:00:00 2001 From: David Faust Date: Mon, 13 Dec 2021 13:43:28 -0800 Subject: 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 --- gcc/rust/ast/rust-item.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'gcc/rust/ast') 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 &get_fields () { return fields; } const std::vector &get_fields () const { return fields; } - void iterate (std::function cb) - { - for (auto &field : fields) - { - if (!cb (field)) - return; - } - } - protected: /* Use covariance to implement clone function as returning this object * rather than base */ -- cgit v1.1