gccrs: handle bare function types with no specified return type
When we have a function with no return type this defaults to (), but we
need to be sure we generate a new implicit HirId for it otherwise it will
end up in a recursive reference chain.
Fixes #2042
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-type.cc (TypeCheckType::visit):
Add implicit unit type as the return type when not specified
gcc/testsuite/ChangeLog:
* rust/compile/issue-2042.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>