Add a test for #6976

Closes #6976
Better error message when using vectors in statics

Closes #10487
auto merge of #10511 : cmr/rust/addtests, r=alexcrichton

Commit messages have all