mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-30 08:16:56 +00:00
14 lines
300 B
Rust
14 lines
300 B
Rust
// 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);
|
|
}
|