Skip checks for common types with alignment 1
This commit is contained in:
parent
a71b808d77
commit
67540ec950
@ -99,6 +99,13 @@ fn visit_place(&mut self, place: &Place<'tcx>, context: PlaceContext, _location:
|
||||
return;
|
||||
}
|
||||
|
||||
if [self.tcx.types.bool, self.tcx.types.i8, self.tcx.types.u8, self.tcx.types.str_]
|
||||
.contains(&pointee_ty)
|
||||
{
|
||||
debug!("Trivially aligned pointee type: {:?}", pointer_ty);
|
||||
return;
|
||||
}
|
||||
|
||||
self.pointers.push((pointer, pointee_ty))
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user