testsuite: Add test for #4523
auto merge of #4811 : catamorphism/rust/issue-4523-testcase, r=graydon

Just a compile-fail test.