testsuite: Add passing test for #4107
testsuite: Make main fn public
auto merge of #6483 : catamorphism/rust/issue-4107, r=catamorphism