We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89250b9 commit 75bdd95Copy full SHA for 75bdd95
src/librustc_mir/interpret/intern.rs
@@ -327,7 +327,8 @@ pub fn intern_const_alloc_recursive<M: CompileTimeMachine<'mir, 'tcx>>(
327
// We use `delay_span_bug` here, because this can be reached in the presence
328
// of fancy transmutes.
329
if alloc.mutability == Mutability::Mut {
330
- // For better errors later, mark the allocation as immutable (on top of the delayed ICE).
+ // For better errors later, mark the allocation as immutable
331
+ // (on top of the delayed ICE).
332
alloc.mutability = Mutability::Not;
333
ecx.tcx.sess.delay_span_bug(ecx.tcx.span, "mutable allocation in constant");
334
}
0 commit comments