rust/tests/ui/destructuring-assignment/bad-expr-lhs.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

8 lines
256 B
Rust
Raw Normal View History

fn main() {
2019-12-22 18:42:15 +00:00
1 = 2; //~ ERROR invalid left-hand side of assignment
1 += 2; //~ ERROR invalid left-hand side of assignment
2021-11-03 06:50:57 +00:00
(1, 2) = (3, 4);
//~^ ERROR invalid left-hand side of assignment
//~| ERROR invalid left-hand side of assignment
}