Remove a ZST special casing that is not necessary anymore
This commit is contained in:
parent
cc0fbdffe7
commit
5b770b080f
1 changed files with 2 additions and 6 deletions
|
|
@ -596,15 +596,11 @@ impl<'rt, 'mir, 'tcx, M: Machine<'mir, 'tcx>> ValueVisitor<'mir, 'tcx, M>
|
|||
{
|
||||
// Optimized handling for arrays of integer/float type.
|
||||
|
||||
// bailing out for zsts is ok, since the array element type can only be int/float
|
||||
if op.layout.is_zst() {
|
||||
return Ok(());
|
||||
}
|
||||
// non-ZST array cannot be immediate, slices are never immediate
|
||||
// Arrays cannot be immediate, slices are never immediate.
|
||||
let mplace = op.assert_mem_place(self.ecx);
|
||||
// This is the length of the array/slice.
|
||||
let len = mplace.len(self.ecx)?;
|
||||
// zero length slices have nothing to be checked
|
||||
// Zero length slices have nothing to be checked.
|
||||
if len == 0 {
|
||||
return Ok(());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue