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:
commit
412c46cc14
5 changed files with 37 additions and 36 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue