Fix https://github.com/rust-lang/rust/pull/18827 related issue.

Fix https://github.com/rust-lang/rust/pull/18827 related issue.