summary refs log tree commit diff
path: root/src/test/ui/E0594.rs
blob: a8ca2fe61613a5b914f0719cd33b8c2d53a637b4 (plain)
1
2
3
4
5
6
7
8
9
// revisions: ast mir
//[mir]compile-flags: -Z borrowck=mir

static NUM: i32 = 18;

fn main() {
    NUM = 20; //[ast]~ ERROR E0594
              //[mir]~^ ERROR cannot assign to immutable static item `NUM`
}