rustc: Check LHS expression of assignment

Fixes #7507
Fixes #7508
test: Add test for LHS expression check