testsuite: Add test for #4210
auto merge of #5453 : catamorphism/rust/issue-4120, r=catamorphism