testsuite: Tests for #6458. Closes #6458
auto merge of #8473 : catamorphism/rust/issue-6458, r=catamorphism