about summary refs log tree commit diff
path: root/tests/ui/macros/invalid-assignment-in-macro-26093.rs
blob: 686a13a3eec3603d65278166b43ce01b38ca4678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// https://github.com/rust-lang/rust/issues/26093
macro_rules! not_a_place {
    ($thing:expr) => {
        $thing = 42;
        //~^ ERROR invalid left-hand side of assignment
        $thing += 42;
        //~^ ERROR invalid left-hand side of assignment
    }
}

fn main() {
    not_a_place!(99);
}