rustc: Check LHS expression of assignment

Fixes #7507
Fixes #7508
test: Add test for LHS expression check
auto merge of #10123 : klutzy/rust/fix-7507, r=alexcrichton

This patch fixes rustc to emit explicit error if LHS of assignment is
not allowed.

Fixes #7507
Fixes #7508