gccrs: Fix compilation of types which hold onto dangling infer vars
There is a case where some generic types are holding onto inference
variable pointers directly. So this gives the backend a chance to do one
final lookup to resolve the type.
This now allows us to compile a full test case for iterators but there is
still one miscompilation in here which results in a segv on O2 and bad
result on -O0.
Addresses #1895
gcc/rust/ChangeLog:
* backend/rust-compile-type.cc (TyTyResolveCompile::visit): do a final lookup
gcc/testsuite/ChangeLog:
* rust/compile/iterators1.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>