@@ -18,6 +18,7 @@ use rustc_span::DUMMY_SP;
1818use rustc_type_ir:: fold:: TypeSuperFoldable ;
1919use rustc_type_ir:: inherent:: * ;
2020use rustc_type_ir:: relate:: Relate ;
21+ use rustc_type_ir:: visit:: { TypeSuperVisitable , TypeVisitable , TypeVisitor } ;
2122use rustc_type_ir:: { self as ir, CanonicalVarValues , Interner } ;
2223use rustc_type_ir_macros:: { Lift_Generic , TypeFoldable_Generic , TypeVisitable_Generic } ;
2324use std:: ops:: ControlFlow ;
@@ -634,7 +635,6 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> EvalCtxt<'_, Infcx> {
634635 }
635636 }
636637
637- /* TODO:
638638 /// Is the projection predicate is of the form `exists<T> <Ty as Trait>::Assoc = T`.
639639 ///
640640 /// This is the case if the `term` does not occur in any other part of the predicate
@@ -685,8 +685,8 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> EvalCtxt<'_, Infcx> {
685685 match t. kind ( ) {
686686 ir:: Infer ( ir:: TyVar ( vid) ) => {
687687 if let ir:: TermKind :: Ty ( term) = self . term . kind ( )
688- && let Some( term_vid) = term.ty_vid ()
689- && self.infcx.root_var (vid) == self.infcx.root_var (term_vid)
688+ && let ir :: Infer ( ir :: TyVar ( term_vid) ) = term. kind ( )
689+ && self . infcx . root_ty_var ( vid) == self . infcx . root_ty_var ( term_vid)
690690 {
691691 ControlFlow :: Break ( ( ) )
692692 } else {
@@ -736,7 +736,6 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> EvalCtxt<'_, Infcx> {
736736 goal. predicate . alias . visit_with ( & mut visitor) . is_continue ( )
737737 && goal. param_env . visit_with ( & mut visitor) . is_continue ( )
738738 }
739- */
740739
741740 #[ instrument( level = "trace" , skip( self , param_env) , ret) ]
742741 pub ( super ) fn eq < T : Relate < I > > (
0 commit comments