aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-11-01 11:52:51 +0000
committerGitHub <noreply@github.com>2021-11-01 11:52:51 +0000
commit1be610afab2d1f3fce433be2eeb9b4b8d11bdf0d (patch)
tree56a34e691457a303c5b987b8d8996e16268d8228 /gcc/rust/ast
parentca0b06f86fd44bd6067563dcbf4a2c021f2a79a5 (diff)
parent66832f312a7db436110a3b08ff51eac349d5fdbf (diff)
downloadgcc-1be610afab2d1f3fce433be2eeb9b4b8d11bdf0d.zip
gcc-1be610afab2d1f3fce433be2eeb9b4b8d11bdf0d.tar.gz
gcc-1be610afab2d1f3fce433be2eeb9b4b8d11bdf0d.tar.bz2
Merge #783
783: Get rid of lambda within `AST::TypePath` and provide a method to return a reference r=philberty a=diohabara ## Related issue This PR will fix <https://github.com/Rust-GCC/gccrs/issues/718> - \[x] GCC development requires copyright assignment or the Developer's Certificate of Origin sign-off, see https://gcc.gnu.org/contribute.html or https://gcc.gnu.org/dco.html - \[x] Read contributing guidlines - \[x] `make check-rust` passes locally - \[x] Run `clang-format` - \[x] Added any relevant test cases to `gcc/testsuite/rust/` Note that you can skip the above if you are just opening a WIP PR in order to get feedback. Co-authored-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