提交 f3e7efc8 编写于 作者: R Ralf Jung

fix layout sanity check

上级 128c634c
......@@ -199,7 +199,12 @@ fn from_known_layout<'tcx>(
match layout {
None => compute(),
Some(layout) => {
debug_assert_eq!(layout.ty, compute()?.ty);
if cfg!(debug_assertions) {
let layout2 = compute()?;
assert_eq!(layout.details, layout2.details,
"Mismatch in layout of supposedly equal-layout types {:?} and {:?}",
layout.ty, layout2.ty);
}
Ok(layout)
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册