We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a231865 commit 98e52c2Copy full SHA for 98e52c2
compiler/rustc_middle/src/ty/layout.rs
@@ -232,6 +232,10 @@ fn sanity_check_layout<'tcx>(
232
assert!(layout.abi.is_uninhabited());
233
}
234
235
+ if layout.size.bytes() % layout.align.abi.bytes() != 0 {
236
+ bug!("size is not a multiple of align, in the following layout:\n{layout:#?}");
237
+ }
238
+
239
if cfg!(debug_assertions) {
240
fn check_layout_abi<'tcx>(tcx: TyCtxt<'tcx>, layout: Layout<'tcx>) {
241
match layout.abi() {
0 commit comments