Ported to Rust-0.8