Tidy
This commit is contained in:
parent
89250b97f5
commit
75bdd95d4e
1 changed files with 2 additions and 1 deletions
|
@ -327,7 +327,8 @@ pub fn intern_const_alloc_recursive<M: CompileTimeMachine<'mir, 'tcx>>(
|
||||||
// We use `delay_span_bug` here, because this can be reached in the presence
|
// We use `delay_span_bug` here, because this can be reached in the presence
|
||||||
// of fancy transmutes.
|
// of fancy transmutes.
|
||||||
if alloc.mutability == Mutability::Mut {
|
if alloc.mutability == Mutability::Mut {
|
||||||
// For better errors later, mark the allocation as immutable (on top of the delayed ICE).
|
// For better errors later, mark the allocation as immutable
|
||||||
|
// (on top of the delayed ICE).
|
||||||
alloc.mutability = Mutability::Not;
|
alloc.mutability = Mutability::Not;
|
||||||
ecx.tcx.sess.delay_span_bug(ecx.tcx.span, "mutable allocation in constant");
|
ecx.tcx.sess.delay_span_bug(ecx.tcx.span, "mutable allocation in constant");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue