more precise error for 'based on misaligned pointer' case

This commit is contained in:
Ralf Jung 2023-09-26 16:25:05 +02:00
parent cbf47a17d2
commit e24835c6e0
31 changed files with 112 additions and 91 deletions

View file

@ -385,7 +385,7 @@ impl<'rt, 'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> ValidityVisitor<'rt, 'mir, '
CheckInAllocMsg::InboundsTest, // will anyway be replaced by validity message
),
self.path,
Ub(AlignmentCheckFailed(Misalignment { required, has })) => UnalignedPtr {
Ub(AlignmentCheckFailed(Misalignment { required, has }, _msg)) => UnalignedPtr {
ptr_kind,
required_bytes: required.bytes(),
found_bytes: has.bytes()