Add test for #4666, which didn't *quite* seem to be covered by
existing tests. The bug itself was fixed as part of recent borrowck
reform.

Fixes #4666.
auto merge of #6303 : nikomatsakis/rust/issue-4666-test, r=nikomatsakis

existing tests. The bug itself was fixed as part of recent borrowck
reform.

Fixes #4666.