Add+Use mir::BinOp::Cmp

This commit is contained in:
Scott McMurray
2023-03-05 20:19:41 -08:00
parent 744c664ba2
commit 3da115a93b
35 changed files with 521 additions and 119 deletions

View File

@@ -987,6 +987,15 @@ impl<'a, 'tcx> Visitor<'tcx> for TypeChecker<'a, 'tcx> {
)
}
}
Cmp => {
for x in [a, b] {
check_kinds!(
x,
"Cannot three-way compare non-integer type {:?}",
ty::Char | ty::Uint(..) | ty::Int(..)
)
}
}
AddUnchecked | SubUnchecked | MulUnchecked | Shl | ShlUnchecked | Shr
| ShrUnchecked => {
for x in [a, b] {