mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 06:26:55 +00:00
Skip checks for common types with alignment 1
This commit is contained in:
parent
a71b808d77
commit
67540ec950
@ -99,6 +99,13 @@ impl<'tcx, 'a> Visitor<'tcx> for PointerFinder<'tcx, 'a> {
|
||||
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