1
Fork 0

Rollup merge of #125399 - scottmcm:less-hir-in-cg_ssa, r=compiler-errors

Stop using `to_hir_binop` in codegen

This came up in https://github.com/rust-lang/rust/pull/125359#discussion_r1609401311 , and looking into it we can just use the `mir::BinOp`s directly instead of `hir::BinOpKind`s.

(AKA rather than going `mir::BinOp` → `hir::BinOpKind` → `IntPredicate`, just go `mir::BinOp` → `IntPredicate`.)
This commit is contained in:
León Orell Valerian Liehr 2024-05-22 23:41:14 +02:00 committed by GitHub
commit 412c46cc14
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 37 additions and 36 deletions

View file

@ -295,7 +295,7 @@ impl BorrowKind {
}
impl BinOp {
pub fn to_hir_binop(self) -> hir::BinOpKind {
pub(crate) fn to_hir_binop(self) -> hir::BinOpKind {
match self {
BinOp::Add => hir::BinOpKind::Add,
BinOp::Sub => hir::BinOpKind::Sub,