Add test for #3053. Fixes #3053.
auto merge of #10446 : nikomatsakis/rust/issue-3053-test-rooted-in-moved-value, r=nikomatsakis