2018-01-28 17:59:34 -06:00
|
|
|
macro_rules! not_a_place {
|
2016-01-21 15:14:09 -06:00
|
|
|
($thing:expr) => {
|
|
|
|
$thing = 42;
|
2019-12-22 12:42:15 -06:00
|
|
|
//~^ ERROR invalid left-hand side of assignment
|
|
|
|
$thing += 42;
|
|
|
|
//~^ ERROR invalid left-hand side of assignment
|
2016-01-21 15:14:09 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2018-01-28 17:59:34 -06:00
|
|
|
not_a_place!(99);
|
2016-01-21 15:14:09 -06:00
|
|
|
}
|