aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorKadoi Takemaru <diohabara@gmail.com>2021-10-31 22:22:21 +0900
committerKadoi Takemaru <diohabara@gmail.com>2021-11-01 20:05:18 +0900
commit66832f312a7db436110a3b08ff51eac349d5fdbf (patch)
tree56a34e691457a303c5b987b8d8996e16268d8228 /gcc/rust/ast
parentca0b06f86fd44bd6067563dcbf4a2c021f2a79a5 (diff)
downloadgcc-66832f312a7db436110a3b08ff51eac349d5fdbf.zip
gcc-66832f312a7db436110a3b08ff51eac349d5fdbf.tar.gz
gcc-66832f312a7db436110a3b08ff51eac349d5fdbf.tar.bz2
Get rid of lambda within AST::TypePath and provide a method to return a reference
Remove lambda expressions within AST::TypePath and use get_segments() to iterate over AST::TypePathSegment Fixes #718 Signed-off-by: Kadoi Takemaru <diohabara@gmail.com>
Diffstat (limited to 'gcc/rust/ast')
-rw-r--r--gcc/rust/ast/rust-path.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h
index cc2721d..4c437cc 100644
--- a/gcc/rust/ast/rust-path.h
+++ b/gcc/rust/ast/rust-path.h
@@ -754,15 +754,6 @@ public:
}
size_t get_num_segments () const { return segments.size (); }
-
- void iterate_segments (std::function<bool (TypePathSegment *)> cb)
- {
- for (auto it = segments.begin (); it != segments.end (); it++)
- {
- if (!cb ((*it).get ()))
- return;
- }
- }
};
struct QualifiedPathType
@@ -1029,15 +1020,6 @@ public:
}
Location get_locus () const override final { return locus; }
-
- void iterate_segments (std::function<bool (TypePathSegment *)> cb)
- {
- for (auto it = segments.begin (); it != segments.end (); it++)
- {
- if (!cb ((*it).get ()))
- return;
- }
- }
};
} // namespace AST
} // namespace Rust