aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/test_data/parser/ok/0048_compound_assignment.rs
blob: 871720a49a6f47e9216c776bc65d377b174ad8da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// https://github.com/rust-analyzer/rust-analyzer/pull/983

fn compound_assignment() {
    let mut a = 0;
    a += 1;
    a -= 2;
    a *= 3;
    a %= 4;
    a /= 5;
    a |= 6;
    a &= 7;
    a ^= 8;
    a <= 9;
    a >= 10;
    a >>= 11;
    a <<= 12;
}