diff --git a/compiler/rustc_infer/src/infer/at.rs b/compiler/rustc_infer/src/infer/at.rs index 170f44b17e7..5422761a6cf 100644 --- a/compiler/rustc_infer/src/infer/at.rs +++ b/compiler/rustc_infer/src/infer/at.rs @@ -184,30 +184,6 @@ pub fn eq_trace( Ok(InferOk { value: (), obligations: op.into_obligations() }) } - /// Equates `expected` and `found` while structurally relating aliases. - /// This should only be used inside of the next generation trait solver - /// when relating rigid aliases. - pub fn eq_structurally_relating_aliases( - self, - expected: T, - actual: T, - ) -> InferResult<'tcx, ()> - where - T: ToTrace<'tcx>, - { - assert!(self.infcx.next_trait_solver()); - let mut op = TypeRelating::new( - self.infcx, - ToTrace::to_trace(self.cause, expected, actual), - self.param_env, - DefineOpaqueTypes::Yes, - StructurallyRelateAliases::Yes, - ty::Invariant, - ); - op.relate(expected, actual)?; - Ok(InferOk { value: (), obligations: op.into_obligations() }) - } - pub fn relate( self, define_opaque_types: DefineOpaqueTypes, @@ -293,23 +269,6 @@ pub fn lub(self, expected: T, actual: T) -> InferResult<'tcx, T> let value = op.relate(expected, actual)?; Ok(InferOk { value, obligations: op.into_obligations() }) } - - /// Computes the greatest-lower-bound, or mutual subtype, of two - /// values. As with `lub` order doesn't matter, except for error - /// cases. - pub fn glb(self, expected: T, actual: T) -> InferResult<'tcx, T> - where - T: ToTrace<'tcx>, - { - let mut op = LatticeOp::new( - self.infcx, - ToTrace::to_trace(self.cause, expected, actual), - self.param_env, - LatticeOpKind::Glb, - ); - let value = op.relate(expected, actual)?; - Ok(InferOk { value, obligations: op.into_obligations() }) - } } impl<'tcx> ToTrace<'tcx> for ImplSubject<'tcx> {