about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src/transform
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-03-08 02:57:02 +0000
committerMichael Goulet <michael@errs.io>2024-03-08 02:57:06 +0000
commit025ad403a976cbb80a3a472e333f4544baef9261 (patch)
treef1d051089ec86882c455db0297ce56352b94ba08 /compiler/rustc_const_eval/src/transform
parent1c580bcb703d2ba288c380d2e283451a34d4eb1c (diff)
downloadrust-025ad403a976cbb80a3a472e333f4544baef9261.tar.gz
rust-025ad403a976cbb80a3a472e333f4544baef9261.zip
Don't ICE in CTFE if raw/fn-ptr types differ
Diffstat (limited to 'compiler/rustc_const_eval/src/transform')
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/check.rs1
1 files changed, 0 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/check.rs b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
index 0b41b4f9682..7ec78e7b9cf 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/check.rs
@@ -581,7 +581,6 @@ impl<'tcx> Visitor<'tcx> for Checker<'_, 'tcx> {
                 if is_int_bool_or_char(lhs_ty) && is_int_bool_or_char(rhs_ty) {
                     // Int, bool, and char operations are fine.
                 } else if lhs_ty.is_fn_ptr() || lhs_ty.is_unsafe_ptr() {
-                    assert_eq!(lhs_ty, rhs_ty);
                     assert!(matches!(
                         op,
                         BinOp::Eq