From: Philip Herron <philip.her...@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(-) diff --git a/gcc/rust/resolve/rust-ast-resolve-type.cc b/gcc/rust/resolve/rust-ast-resolve-type.cc index d227b8b539a..e5c712aba07 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 ¶m : fn.get_params ()) + { + ResolveType::go (param.get ()); + } + + if (fn.has_return_type ()) + { + ResolveType::go (fn.get_return_type ().get ()); + } + break; } -- 2.39.1