|
1 |
| -//! There are four type combiners: [TypeRelating], [Lub], and [Glb], |
| 1 | +//! There are four type combiners: [TypeRelating], `Lub`, and `Glb`, |
2 | 2 | //! and `NllTypeRelating` in rustc_borrowck, which is only used for NLL.
|
3 | 3 | //!
|
4 | 4 | //! Each implements the trait [TypeRelation] and contains methods for
|
@@ -26,8 +26,7 @@ use rustc_middle::ty::{self, InferConst, IntType, Ty, TyCtxt, TypeVisitableExt,
|
26 | 26 | pub use rustc_next_trait_solver::relate::combine::*;
|
27 | 27 | use tracing::debug;
|
28 | 28 |
|
29 |
| -use super::glb::Glb; |
30 |
| -use super::lub::Lub; |
| 29 | +use super::lattice::{LatticeOp, LatticeOpKind}; |
31 | 30 | use super::type_relating::TypeRelating;
|
32 | 31 | use super::{RelateResult, StructurallyRelateAliases};
|
33 | 32 | use crate::infer::{DefineOpaqueTypes, InferCtxt, TypeTrace, relate};
|
@@ -303,12 +302,12 @@ impl<'infcx, 'tcx> CombineFields<'infcx, 'tcx> {
|
303 | 302 | TypeRelating::new(self, StructurallyRelateAliases::No, ty::Contravariant)
|
304 | 303 | }
|
305 | 304 |
|
306 |
| - pub fn lub<'a>(&'a mut self) -> Lub<'a, 'infcx, 'tcx> { |
307 |
| - Lub::new(self) |
| 305 | + pub(crate) fn lub<'a>(&'a mut self) -> LatticeOp<'a, 'infcx, 'tcx> { |
| 306 | + LatticeOp::new(self, LatticeOpKind::Lub) |
308 | 307 | }
|
309 | 308 |
|
310 |
| - pub fn glb<'a>(&'a mut self) -> Glb<'a, 'infcx, 'tcx> { |
311 |
| - Glb::new(self) |
| 309 | + pub(crate) fn glb<'a>(&'a mut self) -> LatticeOp<'a, 'infcx, 'tcx> { |
| 310 | + LatticeOp::new(self, LatticeOpKind::Glb) |
312 | 311 | }
|
313 | 312 |
|
314 | 313 | pub fn register_obligations(
|
|
0 commit comments