Rust 1.0 の abs

fn main() {
    let x: i16 = -32768;
    println!("{}", x);
    println!("{}", x.abs());
}

とすると arithmetic operation overflowed で落ちる。 doc を見ると、"::MIN will be returned if the number is ::MIN" と書いてあるのだが…。

https://github.com/rust-lang/rust/blob/1.0.0/src/libcore/num/mod.rs#L509

あっ…。

ちなみに master を見るとちゃんと直っている感じ(確かめてないけど)。

https://github.com/rust-lang/rust/blob/master/src/libcore/num/mod.rs#L572