Add regression test for #9837.
Add regression test for #9837.

Fixes https://github.com/rust-lang/rust/issues/9837

graydon/rust,graydon/rust,aidancully/rust,aidancully/rust,GBGamer/rust,aidancully/rust,aidancully/rust,graydon/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,GBGamer/rust,graydon/rust,GBGamer/rust,aidancully/rust,aidancully/rust,GBGamer/rust,graydon/rust,graydon/rust