We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
static mut
1 parent 00e62fa commit 14f39aaCopy full SHA for 14f39aa
compiler/rustc_mir/src/transform/check_consts/ops.rs
@@ -274,12 +274,8 @@ impl NonConstOp for CellBorrow {
274
pub struct MutBorrow(pub hir::BorrowKind);
275
276
impl NonConstOp for MutBorrow {
277
- fn status_in_item(&self, ccx: &ConstCx<'_, '_>) -> Status {
278
- match ccx.const_kind() {
279
- // Mutable statics can handle mutable references in their final value
280
- hir::ConstContext::Static(hir::Mutability::Mut) => Status::Allowed,
281
- _ => Status::Forbidden,
282
- }
+ fn status_in_item(&self, _ccx: &ConstCx<'_, '_>) -> Status {
+ Status::Forbidden
283
}
284
285
fn importance(&self) -> DiagnosticImportance {
0 commit comments