diff options
| author | ouz-a <oguz.agcayazi@gmail.com> | 2021-12-14 00:15:50 +0300 |
|---|---|---|
| committer | ouz-a <oguz.agcayazi@gmail.com> | 2021-12-14 00:15:50 +0300 |
| commit | b6c80985bd5c63ebf5f720450c4208fabc20af73 (patch) | |
| tree | 05ff079ebd2fec702bea358c0704abd40d9c814b /compiler/rustc_const_eval | |
| parent | a01b13dede8f4197520ac136d87a831ddfadc9c4 (diff) | |
| download | rust-b6c80985bd5c63ebf5f720450c4208fabc20af73.tar.gz rust-b6c80985bd5c63ebf5f720450c4208fabc20af73.zip | |
Add regression test and comment
Diffstat (limited to 'compiler/rustc_const_eval')
| -rw-r--r-- | compiler/rustc_const_eval/src/interpret/operator.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/interpret/operator.rs b/compiler/rustc_const_eval/src/interpret/operator.rs index 58a51b15faa..3b8b65a50d2 100644 --- a/compiler/rustc_const_eval/src/interpret/operator.rs +++ b/compiler/rustc_const_eval/src/interpret/operator.rs @@ -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: {:?} {:?} {:?}", |
