testsuite: Add test for #4208

Closes #4208
auto merge of #9233 : catamorphism/rust/issue-4208, r=catamorphism

Closes #4208