]> git.lizzy.rs Git - rust.git/blob - tests/ui/opeq.rs
Rollup merge of #107442 - lukas-code:slice-panics, r=cuviper
[rust.git] / tests / ui / opeq.rs
1 // run-pass
2
3 pub fn main() {
4     let mut x: isize = 1;
5     x *= 2;
6     println!("{}", x);
7     assert_eq!(x, 2);
8     x += 3;
9     println!("{}", x);
10     assert_eq!(x, 5);
11     x *= x;
12     println!("{}", x);
13     assert_eq!(x, 25);
14     x /= 5;
15     println!("{}", x);
16     assert_eq!(x, 5);
17 }