Promote unchecked_add/sub/mul/shl/shr to mir::BinOp
This commit is contained in:
parent
8d1fa473dd
commit
39788e07ba
36 changed files with 504 additions and 215 deletions
|
@ -78,8 +78,9 @@ pub(crate) fn destructure_const<'tcx>(
|
|||
fn check_binop(op: mir::BinOp) -> bool {
|
||||
use mir::BinOp::*;
|
||||
match op {
|
||||
Add | Sub | Mul | Div | Rem | BitXor | BitAnd | BitOr | Shl | Shr | Eq | Lt | Le | Ne
|
||||
| Ge | Gt => true,
|
||||
Add | AddUnchecked | Sub | SubUnchecked | Mul | MulUnchecked | Div | Rem | BitXor
|
||||
| BitAnd | BitOr | Shl | ShlUnchecked | Shr | ShrUnchecked | Eq | Lt | Le | Ne | Ge
|
||||
| Gt => true,
|
||||
Offset => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue