rustc: Check LHS expression of assignment

Fixes #7507
Fixes #7508
This commit is contained in:
klutzy 2013-10-29 01:05:33 +09:00
parent bee40a9f98
commit 47abdbd0fe
2 changed files with 11 additions and 1 deletions

View file

@ -12,6 +12,5 @@ static foo: int = 5;
fn main() {
// assigning to various global constants
None = Some(3); //~ ERROR cannot assign to immutable static item
foo = 6; //~ ERROR cannot assign to immutable static item
}