1
Fork 0
This commit is contained in:
Andreas Liljeqvist 2021-08-23 14:18:48 +02:00
parent 225a4bf922
commit d50abd0249
2 changed files with 3 additions and 3 deletions

View file

@ -623,7 +623,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
scalar_layout: &ScalarAbi,
) -> InterpResult<'tcx> {
let value = self.read_scalar(op)?;
let valid_range = scalar_layout.valid_range;
let valid_range = scalar_layout.valid_range.clone();
let AllocationRange { start: lo, end: hi } = valid_range;
// Determine the allowed range
// `max_hi` is as big as the size fits