rust/tests/ui/numbers-arithmetic/u8-incr.rs
2024-02-16 20:02:50 +00:00

16 lines
165 B
Rust

//@ run-pass
pub fn main() {
let mut x: u8 = 12;
let y: u8 = 12;
x = x + 1;
x = x - 1;
assert_eq!(x, y);
// x = 14;
// x = x + 1;
}