]> git.lizzy.rs Git - rust.git/blob - src/test/run-pass/opeq.rs
Rollup merge of #58306 - GuillaumeGomez:crate-browser-history, r=QuietMisdreavus
[rust.git] / src / test / run-pass / opeq.rs
1 pub fn main() {
2     let mut x: isize = 1;
3     x *= 2;
4     println!("{}", x);
5     assert_eq!(x, 2);
6     x += 3;
7     println!("{}", x);
8     assert_eq!(x, 5);
9     x *= x;
10     println!("{}", x);
11     assert_eq!(x, 25);
12     x /= 5;
13     println!("{}", x);
14     assert_eq!(x, 5);
15 }