mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
24 lines
371 B
Rust
24 lines
371 B
Rust
// run-pass
|
|
|
|
pub fn main() {
|
|
let a = 1;
|
|
let a_neg: i8 = -a;
|
|
println!("{}", a_neg);
|
|
|
|
let b = 1;
|
|
let b_neg: i16 = -b;
|
|
println!("{}", b_neg);
|
|
|
|
let c = 1;
|
|
let c_neg: i32 = -c;
|
|
println!("{}", c_neg);
|
|
|
|
let d = 1;
|
|
let d_neg: i64 = -d;
|
|
println!("{}", d_neg);
|
|
|
|
let e = 1;
|
|
let e_neg: isize = -e;
|
|
println!("{}", e_neg);
|
|
}
|