test: Add tests for closed issue #10764

Closes #10764
auto merge of #14598 : alexcrichton/rust/triage, r=huonw

Closes #10764