References in statics and constants may only refer to immutable values.

Erroneous code example:

static X: i32 = 1;
const C: i32 = 2;

// these three are not allowed:
const CR: &mut i32 = &mut C;
static STATIC_REF: &'static mut i32 = &mut X;
static CONST_REF: &'static mut i32 = &mut C;

Statics are shared everywhere, and if they refer to mutable data one might violate memory safety since holding multiple mutable references to shared data is not allowed.

If you really want global mutable state, try using static mut or a global UnsafeCell.