testsuite: Add test for #4333
auto merge of #5619 : catamorphism/rust/issue-4333, r=catamorphism