aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-10-25 13:26:21 +0000
committerGitHub <noreply@github.com>2021-10-25 13:26:21 +0000
commitaefdb4d0365ce9f010be58afee74f81a1777f29f (patch)
tree2559822b214026dff3e706f80bec551bfde33e6c /gcc/rust/ast/rust-expr.h
parent868d3125d326a6800376411fb6699d984cfa7101 (diff)
parent1d3a36276a07a7472ed39499a2c9ddce37146d93 (diff)
downloadgcc-aefdb4d0365ce9f010be58afee74f81a1777f29f.zip
gcc-aefdb4d0365ce9f010be58afee74f81a1777f29f.tar.gz
gcc-aefdb4d0365ce9f010be58afee74f81a1777f29f.tar.bz2
Merge #767
767: gccrs: StructExprStructFields: remove `iterate` method r=philberty a=mathstuf This provides a getter for the set of fields in a struct expression rather than a visitor with a callback which is more complicated for callers, especially static analysis. Signed-off-by: Ben Boeckel <mathstuf@gmail.com> Fixes: #721 Co-authored-by: Ben Boeckel <mathstuf@gmail.com>
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r--gcc/rust/ast/rust-expr.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 5cbc8de..0d3c50e 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -1799,15 +1799,6 @@ public:
return fields;
}
- void iterate (std::function<bool (StructExprField *)> cb)
- {
- for (auto &field : fields)
- {
- if (!cb (field.get ()))
- return;
- }
- }
-
StructBase &get_struct_base () { return struct_base; }
const StructBase &get_struct_base () const { return struct_base; }