Better function calls
This commit is contained in:
@@ -34,8 +34,12 @@ extern {
|
||||
#[inline(always)]
|
||||
fn check_size_and_alignment(size: usize, align: usize) {
|
||||
debug_assert!(size != 0);
|
||||
debug_assert!(size <= isize::MAX as usize, "Tried to allocate too much: {} bytes", size);
|
||||
debug_assert!(usize::is_power_of_two(align), "Invalid alignment of allocation: {}", align);
|
||||
debug_assert!(size <= isize::MAX as usize,
|
||||
"Tried to allocate too much: {} bytes",
|
||||
size);
|
||||
debug_assert!(usize::is_power_of_two(align),
|
||||
"Invalid alignment of allocation: {}",
|
||||
align);
|
||||
}
|
||||
|
||||
// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`
|
||||
|
||||
Reference in New Issue
Block a user