2025-07-13 16:06:48 -04:00
|
|
|
// https://github.com/rust-lang/rust/issues/26093
|
2018-01-29 01:59:34 +02:00
|
|
|
macro_rules! not_a_place {
|
2016-01-21 22:14:09 +01:00
|
|
|
($thing:expr) => {
|
|
|
|
|
$thing = 42;
|
2019-12-22 18:42:15 +00:00
|
|
|
//~^ ERROR invalid left-hand side of assignment
|
|
|
|
|
$thing += 42;
|
|
|
|
|
//~^ ERROR invalid left-hand side of assignment
|
2016-01-21 22:14:09 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2018-01-29 01:59:34 +02:00
|
|
|
not_a_place!(99);
|
2016-01-21 22:14:09 +01:00
|
|
|
}
|