1 // Regression test for #54901: immutable thread locals could be mutated. See:
2 // https://github.com/rust-lang/rust/issues/29594#issuecomment-328177697
3 // https://github.com/rust-lang/rust/issues/54901
5 #![feature(thread_local)]
8 static S: &str = "before";
11 S = "after"; //~ ERROR cannot assign to immutable