diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-05-11 17:06:43 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2024-05-11 17:06:43 +0000 |
| commit | 9e4e8054882de9e0f9496e415eecd5205a52f0e7 (patch) | |
| tree | ae2f76ede4f179a3d70f44bcca4051f25c3f1f11 | |
| parent | 906db0229f8ffadccbb736977113bdc17b9e49f0 (diff) | |
| download | rust-9e4e8054882de9e0f9496e415eecd5205a52f0e7.tar.gz rust-9e4e8054882de9e0f9496e415eecd5205a52f0e7.zip | |
Avoid ICE on transmuting invalid bools
Fixes rust-lang/rustc_codegen_cranelift#1433
| -rw-r--r-- | src/value_and_place.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/value_and_place.rs b/src/value_and_place.rs index a11abd0c0e9..b6d6d211e65 100644 --- a/src/value_and_place.rs +++ b/src/value_and_place.rs @@ -317,14 +317,6 @@ impl<'tcx> CValue<'tcx> { let clif_ty = fx.clif_type(layout.ty).unwrap(); - if let ty::Bool = layout.ty.kind() { - assert!( - const_val == ty::ScalarInt::FALSE || const_val == ty::ScalarInt::TRUE, - "Invalid bool 0x{:032X}", - const_val - ); - } - let val = match layout.ty.kind() { ty::Uint(UintTy::U128) | ty::Int(IntTy::I128) => { let const_val = const_val.assert_bits(layout.size); |
