@@ -18,6 +18,7 @@ use rustc_span::DUMMY_SP;
18
18
use rustc_type_ir:: fold:: TypeSuperFoldable ;
19
19
use rustc_type_ir:: inherent:: * ;
20
20
use rustc_type_ir:: relate:: Relate ;
21
+ use rustc_type_ir:: visit:: { TypeSuperVisitable , TypeVisitable , TypeVisitor } ;
21
22
use rustc_type_ir:: { self as ir, CanonicalVarValues , Interner } ;
22
23
use rustc_type_ir_macros:: { Lift_Generic , TypeFoldable_Generic , TypeVisitable_Generic } ;
23
24
use std:: ops:: ControlFlow ;
@@ -634,7 +635,6 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> EvalCtxt<'_, Infcx> {
634
635
}
635
636
}
636
637
637
- /* TODO:
638
638
/// Is the projection predicate is of the form `exists<T> <Ty as Trait>::Assoc = T`.
639
639
///
640
640
/// 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> {
685
685
match t. kind ( ) {
686
686
ir:: Infer ( ir:: TyVar ( vid) ) => {
687
687
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)
690
690
{
691
691
ControlFlow :: Break ( ( ) )
692
692
} else {
@@ -736,7 +736,6 @@ impl<Infcx: InferCtxtLike<Interner = I>, I: Interner> EvalCtxt<'_, Infcx> {
736
736
goal. predicate . alias . visit_with ( & mut visitor) . is_continue ( )
737
737
&& goal. param_env . visit_with ( & mut visitor) . is_continue ( )
738
738
}
739
- */
740
739
741
740
#[ instrument( level = "trace" , skip( self , param_env) , ret) ]
742
741
pub ( super ) fn eq < T : Relate < I > > (
0 commit comments