summaryrefslogtreecommitdiffstats
path: root/tests/ui/opeq.rs
blob: 9737be97fa3725aace067496837758e19bc1490a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// run-pass

pub fn main() {
    let mut x: isize = 1;
    x *= 2;
    println!("{}", x);
    assert_eq!(x, 2);
    x += 3;
    println!("{}", x);
    assert_eq!(x, 5);
    x *= x;
    println!("{}", x);
    assert_eq!(x, 25);
    x /= 5;
    println!("{}", x);
    assert_eq!(x, 5);
}