@@ -545,6 +545,7 @@ impl<'tcx> Predicate<'tcx> {
545
545
| PredicateKind :: Clause ( Clause :: RegionOutlives ( _) )
546
546
| PredicateKind :: Clause ( Clause :: TypeOutlives ( _) )
547
547
| PredicateKind :: Clause ( Clause :: Projection ( _) )
548
+ | PredicateKind :: AliasEq ( ..)
548
549
| PredicateKind :: ObjectSafe ( _)
549
550
| PredicateKind :: ClosureKind ( _, _, _)
550
551
| PredicateKind :: Subtype ( _)
@@ -632,6 +633,12 @@ pub enum PredicateKind<'tcx> {
632
633
/// A marker predicate that is always ambiguous.
633
634
/// Used for coherence to mark opaque types as possibly equal to each other but ambiguous.
634
635
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 > ) ,
635
642
}
636
643
637
644
/// The crate outlives map is computed during typeck and contains the
@@ -1152,6 +1159,7 @@ impl<'tcx> Predicate<'tcx> {
1152
1159
match predicate. skip_binder ( ) {
1153
1160
PredicateKind :: Clause ( Clause :: Trait ( t) ) => Some ( predicate. rebind ( t) ) ,
1154
1161
PredicateKind :: Clause ( Clause :: Projection ( ..) )
1162
+ | PredicateKind :: AliasEq ( ..)
1155
1163
| PredicateKind :: Subtype ( ..)
1156
1164
| PredicateKind :: Coerce ( ..)
1157
1165
| PredicateKind :: Clause ( Clause :: RegionOutlives ( ..) )
@@ -1171,6 +1179,7 @@ impl<'tcx> Predicate<'tcx> {
1171
1179
match predicate. skip_binder ( ) {
1172
1180
PredicateKind :: Clause ( Clause :: Projection ( t) ) => Some ( predicate. rebind ( t) ) ,
1173
1181
PredicateKind :: Clause ( Clause :: Trait ( ..) )
1182
+ | PredicateKind :: AliasEq ( ..)
1174
1183
| PredicateKind :: Subtype ( ..)
1175
1184
| PredicateKind :: Coerce ( ..)
1176
1185
| PredicateKind :: Clause ( Clause :: RegionOutlives ( ..) )
@@ -1191,6 +1200,7 @@ impl<'tcx> Predicate<'tcx> {
1191
1200
PredicateKind :: Clause ( Clause :: TypeOutlives ( data) ) => Some ( predicate. rebind ( data) ) ,
1192
1201
PredicateKind :: Clause ( Clause :: Trait ( ..) )
1193
1202
| PredicateKind :: Clause ( Clause :: Projection ( ..) )
1203
+ | PredicateKind :: AliasEq ( ..)
1194
1204
| PredicateKind :: Subtype ( ..)
1195
1205
| PredicateKind :: Coerce ( ..)
1196
1206
| PredicateKind :: Clause ( Clause :: RegionOutlives ( ..) )
0 commit comments