aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorM V V S Manoj Kumar <mvvsmanojkumar@gmail.com>2022-02-13 08:52:25 +0530
committerM V V S Manoj Kumar <mvvsmanojkumar@gmail.com>2022-02-17 22:11:23 +0530
commitee4131396ebebf75280fe88a23c2d1778541376c (patch)
treeb3e268e01cf45bc6ab4302439812f207e26d9169 /gcc/rust/ast
parentb71cc52613219f353b054eb5520cd3886f354c10 (diff)
downloadgcc-ee4131396ebebf75280fe88a23c2d1778541376c.zip
gcc-ee4131396ebebf75280fe88a23c2d1778541376c.tar.gz
gcc-ee4131396ebebf75280fe88a23c2d1778541376c.tar.bz2
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 <mvvsmanojkumar@gmail.com>
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-path.h9
1 files changed, 0 insertions, 9 deletions
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<PathExprSegment> &get_segments () { return segments; }
const std::vector<PathExprSegment> &get_segments () const { return segments; }
-
- void iterate_path_segments (std::function<bool (PathExprSegment &)> 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