Add regression test and comment
This commit is contained in:
parent
a01b13dede
commit
b6c80985bd
2 changed files with 10 additions and 1 deletions
|
@ -328,7 +328,8 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
|
|||
self.binary_int_op(bin_op, l, left.layout, r, right.layout)
|
||||
}
|
||||
_ if left.layout.ty.is_any_ptr() => {
|
||||
// The RHS type must be the same *or an integer type* (for `Offset`).
|
||||
// The RHS type must be a `pointer` *or an integer type* (for `Offset`).
|
||||
// (This is workaround for the issue #91636)
|
||||
assert!(
|
||||
right.layout.ty.is_any_ptr() || right.layout.ty.is_integral(),
|
||||
"Unexpected types for BinOp: {:?} {:?} {:?}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue