Rollup merge of #72752 - lcnr:remove-mk_bool, r=estebank
remove mk_bool
This commit is contained in:
commit
025058f2aa
2 changed files with 4 additions and 9 deletions
|
@ -2251,11 +2251,6 @@ impl<'tcx> TyCtxt<'tcx> {
|
|||
if self.features().never_type_fallback { self.types.never } else { self.types.unit }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn mk_bool(self) -> Ty<'tcx> {
|
||||
self.mk_ty(Bool)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn mk_fn_def(self, def_id: DefId, substs: SubstsRef<'tcx>) -> Ty<'tcx> {
|
||||
self.mk_ty(FnDef(def_id, substs))
|
||||
|
|
|
@ -121,9 +121,9 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
let tcx = self.tcx;
|
||||
match BinOpCategory::from(op) {
|
||||
BinOpCategory::Shortcircuit => {
|
||||
self.demand_suptype(*lhs_span, tcx.mk_bool(), lhs_ty);
|
||||
self.demand_suptype(*rhs_span, tcx.mk_bool(), rhs_ty);
|
||||
tcx.mk_bool()
|
||||
self.demand_suptype(*lhs_span, tcx.types.bool, lhs_ty);
|
||||
self.demand_suptype(*rhs_span, tcx.types.bool, rhs_ty);
|
||||
tcx.types.bool
|
||||
}
|
||||
|
||||
BinOpCategory::Shift => {
|
||||
|
@ -140,7 +140,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
BinOpCategory::Comparison => {
|
||||
// both LHS and RHS and result will have the same type
|
||||
self.demand_suptype(*rhs_span, lhs_ty, rhs_ty);
|
||||
tcx.mk_bool()
|
||||
tcx.types.bool
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue