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.

10 lines
324 B
Rust
Raw Normal View History

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