test: Add two tests for issue #6272.
auto merge of #6376 : nikomatsakis/rust/issue-6272-tests, r=graydon

r? @graydon