Add a test for #5844 (a closed issue now)
auto merge of #7987 : alexcrichton/rust/tests-for-closed-issues, r=huonw

Closes #5844