]> git.lizzy.rs Git - rust.git/blob - src/test/ui/opeq.rs
Merge commit 'd3a2366ee877075c59b38bd8ced55f224fc7ef51' into sync_cg_clif-2022-07-26
[rust.git] / src / test / 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 }