Fix bug: metadata for struct constructor function needs to encode info
on its generic type parameters.

Test case to follow.
test case for issue #10031.
auto merge of #11851 : pnkfelix/rust/fsk-fix-issue-10031, r=alexcrichton

Fix #10031.