Add testcase for #11493
auto merge of #14010 : richo/rust/tests/11493, r=alexcrichton

Is this what you had in mind?

Closes #11493