Don't ICE in CTFE if raw/fn-ptr types differ
This commit is contained in:
parent
1c580bcb70
commit
025ad403a9
3 changed files with 16 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue