@@ -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 ¶m : fn.get_params ())
+ {
+ ResolveType::go (param.get ());
+ }
+
+ if (fn.has_return_type ())
+ {
+ ResolveType::go (fn.get_return_type ().get ());
+ }
+
break;
}
From: Philip Herron <philip.herron@embecosm.com> gcc/rust/ChangeLog: * resolve/rust-ast-resolve-type.cc (ResolveRelativeTypePath::go): Add missing handling of function case. --- gcc/rust/resolve/rust-ast-resolve-type.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)