@@ -184,30 +184,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
184184 Ok ( InferOk { value : ( ) , obligations : op. into_obligations ( ) } )
185185 }
186186
187- /// Equates `expected` and `found` while structurally relating aliases.
188- /// This should only be used inside of the next generation trait solver
189- /// when relating rigid aliases.
190- pub fn eq_structurally_relating_aliases < T > (
191- self ,
192- expected : T ,
193- actual : T ,
194- ) -> InferResult < ' tcx , ( ) >
195- where
196- T : ToTrace < ' tcx > ,
197- {
198- assert ! ( self . infcx. next_trait_solver( ) ) ;
199- let mut op = TypeRelating :: new (
200- self . infcx ,
201- ToTrace :: to_trace ( self . cause , expected, actual) ,
202- self . param_env ,
203- DefineOpaqueTypes :: Yes ,
204- StructurallyRelateAliases :: Yes ,
205- ty:: Invariant ,
206- ) ;
207- op. relate ( expected, actual) ?;
208- Ok ( InferOk { value : ( ) , obligations : op. into_obligations ( ) } )
209- }
210-
211187 pub fn relate < T > (
212188 self ,
213189 define_opaque_types : DefineOpaqueTypes ,
@@ -293,23 +269,6 @@ impl<'a, 'tcx> At<'a, 'tcx> {
293269 let value = op. relate ( expected, actual) ?;
294270 Ok ( InferOk { value, obligations : op. into_obligations ( ) } )
295271 }
296-
297- /// Computes the greatest-lower-bound, or mutual subtype, of two
298- /// values. As with `lub` order doesn't matter, except for error
299- /// cases.
300- pub fn glb < T > ( self , expected : T , actual : T ) -> InferResult < ' tcx , T >
301- where
302- T : ToTrace < ' tcx > ,
303- {
304- let mut op = LatticeOp :: new (
305- self . infcx ,
306- ToTrace :: to_trace ( self . cause , expected, actual) ,
307- self . param_env ,
308- LatticeOpKind :: Glb ,
309- ) ;
310- let value = op. relate ( expected, actual) ?;
311- Ok ( InferOk { value, obligations : op. into_obligations ( ) } )
312- }
313272}
314273
315274impl < ' tcx > ToTrace < ' tcx > for ImplSubject < ' tcx > {
0 commit comments