3 #![feature(thread_local)]
4 #![feature(const_swap)]
6 static mut STATIC_VAR_2: [u32; 8] = [4; 8];
7 const fn g(x: &mut [u32; 8]) {
8 //~^ ERROR mutable references are not allowed
9 std::mem::swap(x, &mut STATIC_VAR_2)
10 //~^ ERROR thread-local statics cannot be accessed
11 //~| ERROR mutable references are not allowed
12 //~| ERROR use of mutable static is unsafe
13 //~| constant functions cannot refer to statics