aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/ast/rust-collect-lang-items.cc8
-rw-r--r--gcc/rust/ast/rust-collect-lang-items.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-collect-lang-items.cc b/gcc/rust/ast/rust-collect-lang-items.cc
index 308720a..50d134a 100644
--- a/gcc/rust/ast/rust-collect-lang-items.cc
+++ b/gcc/rust/ast/rust-collect-lang-items.cc
@@ -82,5 +82,13 @@ CollectLangItems::visit (AST::TraitItemType &item)
DefaultASTVisitor::visit (item);
}
+void
+CollectLangItems::visit (AST::Function &item)
+{
+ maybe_add_lang_item (item);
+
+ DefaultASTVisitor::visit (item);
+}
+
} // namespace AST
} // namespace Rust
diff --git a/gcc/rust/ast/rust-collect-lang-items.h b/gcc/rust/ast/rust-collect-lang-items.h
index 552648f..1d021b1 100644
--- a/gcc/rust/ast/rust-collect-lang-items.h
+++ b/gcc/rust/ast/rust-collect-lang-items.h
@@ -47,6 +47,7 @@ public:
void visit (AST::Trait &item) override;
void visit (AST::TraitItemType &item) override;
+ void visit (AST::Function &item) override;
private:
template <typename T> void maybe_add_lang_item (const T &item);