mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 02:03:53 +00:00
Update src/librustc_mir/interpret/intern.rs
Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit is contained in:
parent
e56a86162c
commit
89250b97f5
@ -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");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user