From ee4131396ebebf75280fe88a23c2d1778541376c Mon Sep 17 00:00:00 2001 From: M V V S Manoj Kumar Date: Sun, 13 Feb 2022 08:52:25 +0530 Subject: Removed Lambda Function within AST::PathPattern Addresses issue #717 1) Changed the rust-path.h and removed the iterate_path_segments fuction. 2) Removed the lambda fuction form rust-ast-lower.cc and replaced it with a for loop. Signed-off-by : M V V S Manoj Kumar --- gcc/rust/ast/rust-path.h | 9 --------- 1 file changed, 9 deletions(-) (limited to 'gcc/rust/ast') diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h index e062dc6..a4749cc 100644 --- a/gcc/rust/ast/rust-path.h +++ b/gcc/rust/ast/rust-path.h @@ -303,15 +303,6 @@ public: // TODO: this seems kinda dodgy std::vector &get_segments () { return segments; } const std::vector &get_segments () const { return segments; } - - void iterate_path_segments (std::function cb) - { - for (auto it = segments.begin (); it != segments.end (); it++) - { - if (!cb (*it)) - return; - } - } }; /* AST node representing a path-in-expression pattern (path that allows generic -- cgit v1.1