Allow static mut definitions with #[linkage] Unlike static declarations with #[linkage], for definitions rustc doesn't rewrite it to add an extra indirection. This was accidentally disallowed in https://github.com/rust-lang/rust/pull/125046. cc https://github.com/rust-lang/rust/pull/125800#issuecomment-2143776298
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.