Skip to content

Commit 9e4e805

Browse files
committed
Avoid ICE on transmuting invalid bools
Fixes #1433
1 parent 906db02 commit 9e4e805

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

src/value_and_place.rs

-8
Original file line numberDiff line numberDiff line change
@@ -317,14 +317,6 @@ impl<'tcx> CValue<'tcx> {
317317

318318
let clif_ty = fx.clif_type(layout.ty).unwrap();
319319

320-
if let ty::Bool = layout.ty.kind() {
321-
assert!(
322-
const_val == ty::ScalarInt::FALSE || const_val == ty::ScalarInt::TRUE,
323-
"Invalid bool 0x{:032X}",
324-
const_val
325-
);
326-
}
327-
328320
let val = match layout.ty.kind() {
329321
ty::Uint(UintTy::U128) | ty::Int(IntTy::I128) => {
330322
let const_val = const_val.assert_bits(layout.size);

0 commit comments

Comments
 (0)