mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
13 lines
250 B
Rust
13 lines
250 B
Rust
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);
|
|
}
|