@@ -545,6 +545,7 @@ impl<'tcx> Predicate<'tcx> {
545545 | PredicateKind :: Clause ( Clause :: RegionOutlives ( _) )
546546 | PredicateKind :: Clause ( Clause :: TypeOutlives ( _) )
547547 | PredicateKind :: Clause ( Clause :: Projection ( _) )
548+ | PredicateKind :: AliasEq ( ..)
548549 | PredicateKind :: ObjectSafe ( _)
549550 | PredicateKind :: ClosureKind ( _, _, _)
550551 | PredicateKind :: Subtype ( _)
@@ -632,6 +633,12 @@ pub enum PredicateKind<'tcx> {
632633 /// A marker predicate that is always ambiguous.
633634 /// Used for coherence to mark opaque types as possibly equal to each other but ambiguous.
634635 Ambiguous ,
636+
637+ /// Separate from `Clause::Projection` which is used for normalization in new solver.
638+ /// This predicate requires two terms to be equal to eachother.
639+ ///
640+ /// Only used for new solver
641+ AliasEq ( Term < ' tcx > , Term < ' tcx > ) ,
635642}
636643
637644/// The crate outlives map is computed during typeck and contains the
@@ -1152,6 +1159,7 @@ impl<'tcx> Predicate<'tcx> {
11521159 match predicate. skip_binder ( ) {
11531160 PredicateKind :: Clause ( Clause :: Trait ( t) ) => Some ( predicate. rebind ( t) ) ,
11541161 PredicateKind :: Clause ( Clause :: Projection ( ..) )
1162+ | PredicateKind :: AliasEq ( ..)
11551163 | PredicateKind :: Subtype ( ..)
11561164 | PredicateKind :: Coerce ( ..)
11571165 | PredicateKind :: Clause ( Clause :: RegionOutlives ( ..) )
@@ -1171,6 +1179,7 @@ impl<'tcx> Predicate<'tcx> {
11711179 match predicate. skip_binder ( ) {
11721180 PredicateKind :: Clause ( Clause :: Projection ( t) ) => Some ( predicate. rebind ( t) ) ,
11731181 PredicateKind :: Clause ( Clause :: Trait ( ..) )
1182+ | PredicateKind :: AliasEq ( ..)
11741183 | PredicateKind :: Subtype ( ..)
11751184 | PredicateKind :: Coerce ( ..)
11761185 | PredicateKind :: Clause ( Clause :: RegionOutlives ( ..) )
@@ -1191,6 +1200,7 @@ impl<'tcx> Predicate<'tcx> {
11911200 PredicateKind :: Clause ( Clause :: TypeOutlives ( data) ) => Some ( predicate. rebind ( data) ) ,
11921201 PredicateKind :: Clause ( Clause :: Trait ( ..) )
11931202 | PredicateKind :: Clause ( Clause :: Projection ( ..) )
1203+ | PredicateKind :: AliasEq ( ..)
11941204 | PredicateKind :: Subtype ( ..)
11951205 | PredicateKind :: Coerce ( ..)
11961206 | PredicateKind :: Clause ( Clause :: RegionOutlives ( ..) )
0 commit comments