Fix a warning when generating tests
auto merge of #7591 : alexcrichton/rust/fix-warnings, r=huonw

Closes #7589
Revert "De-share ast::Ty"

This reverts commit 47eca2113c5c55a4ffbb8c11a38c8ca7a79a1d72.