aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve-type.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc
index 6b08613..e42bab6 100644
--- a/gcc/rust/resolve/rust-ast-resolve-type.cc
+++ b/gcc/rust/resolve/rust-ast-resolve-type.cc
@@ -149,7 +149,20 @@ ResolveRelativeTypePath::go (AST::TypePath &path, NodeId &resolved_node_id)
break;
case AST::TypePathSegment::SegmentType::FUNCTION:
- gcc_unreachable ();
+ AST::TypePathSegmentFunction *fnseg
+ = static_cast<AST::TypePathSegmentFunction *> (segment.get ());
+
+ AST::TypePathFunction &fn = fnseg->get_type_path_function ();
+ for (auto &param : fn.get_params ())
+ {
+ ResolveType::go (param.get ());
+ }
+
+ if (fn.has_return_type ())
+ {
+ ResolveType::go (fn.get_return_type ().get ());
+ }
+
break;
}