serde_macros 0.5.0

Macros to auto-generate implementations for the serde framework
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::u64;
use std::i64;
use std::env;

extern crate bar;

#[test]
fn test() {
    //let x: u64 = (i64::MAX - 0) as u64;
    let x: i64 = -9223372036854775808;
    println!("min {}", i64::MIN);
    println!("max {}", i64::MAX);
    println!("");
    println!("x   {}", x as i64);
    //println!("-x  {}", -(x as i64));
    //println!("cas {}", (!x + 1) as i64);
    println!("wra {}", (x as i64).wrapping_neg() as u64);
}