We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 438c40e commit 303ee3fCopy full SHA for 303ee3f
library/alloc/src/raw_vec.rs
@@ -494,6 +494,7 @@ where
494
alloc_guard(new_layout.size())?;
495
496
let memory = if let Some((ptr, old_layout)) = current_memory {
497
+ debug_assert_eq!(old_layout.align(), new_layout.align());
498
unsafe { alloc.grow(ptr, old_layout, new_layout) }
499
} else {
500
alloc.alloc(new_layout)
0 commit comments