]> git.lizzy.rs Git - rust.git/commitdiff
remove debug_assert in padding_needed_for
authorgnzlbg <gonzalobg88@gmail.com>
Sat, 2 Jun 2018 14:03:33 +0000 (16:03 +0200)
committergnzlbg <gonzalobg88@gmail.com>
Sat, 2 Jun 2018 14:03:33 +0000 (16:03 +0200)
src/libcore/alloc.rs

index 064c7514112b50d20e9a6d2880c18f383cfd2888..cddd142045adaf63ca888f27dcccac3386f3ed00 100644 (file)
@@ -204,9 +204,6 @@ pub fn align_to(&self, align: usize) -> Self {
     /// satisfy this constraint is to ensure `align <= self.align()`.
     #[inline]
     pub fn padding_needed_for(&self, align: usize) -> usize {
-        // **FIXME**: This function is only called with proper power-of-two
-        // alignments. Maybe we should turn this into a real assert!.
-        debug_assert!(align.is_power_of_two());
         let len = self.size();
 
         // Rounded up value is: