Skip to content

Commit

Permalink
Update src/librustc_mir/interpret/intern.rs
Browse files Browse the repository at this point in the history
Co-Authored-By: Ralf Jung <[email protected]>
  • Loading branch information
oli-obk and RalfJung committed Dec 23, 2019
1 parent e56a861 commit 89250b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ pub fn intern_const_alloc_recursive<M: CompileTimeMachine<'mir, 'tcx>>(
// We use `delay_span_bug` here, because this can be reached in the presence
// of fancy transmutes.
if alloc.mutability == Mutability::Mut {
// For better errors later, mark the allocation as immutable
// For better errors later, mark the allocation as immutable (on top of the delayed ICE).
alloc.mutability = Mutability::Not;
ecx.tcx.sess.delay_span_bug(ecx.tcx.span, "mutable allocation in constant");
}
Expand Down

0 comments on commit 89250b9

Please sign in to comment.