Closed
Description
It appears that the syntax::ext::quote::rt::ToSource
implementation for signed integer types omits the sign.
test.rs:
extern crate syntax;
#[test]
fn test() {
use syntax::ext::quote::rt::ToSource;
let n = -5i32;
let s = n.to_source();
assert_eq!(s, "-5i32".to_string());
}
Output after compiling with rustc 0.13.0-nightly (40b244973 2014-10-14 23:22:20 +0000)
:
task 'test' failed at 'assertion failed: `(left == right) && (right == left)` (left: `5i32`, right: `-5i32`)'