avoid walk when get_ptr_alloc
returns no AllocRef
This commit is contained in:
parent
6d03c8d751
commit
d634f14f26
1 changed files with 3 additions and 0 deletions
|
@ -197,6 +197,9 @@ impl<'rt, 'mir, 'tcx: 'mir, M: CompileTimeMachine<'mir, 'tcx, const_eval::Memory
|
||||||
if !alloc.has_relocations() {
|
if !alloc.has_relocations() {
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// We're encountering a ZST here, and can avoid the walk as well.
|
||||||
|
return Ok(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue