@@ -14,7 +14,7 @@ use crate::mir::Body;
14
14
use crate :: mir:: GeneratorLayout ;
15
15
use crate :: traits:: { self , Reveal } ;
16
16
use crate :: ty;
17
- use crate :: ty:: subst:: { InternalSubsts , Subst , SubstsRef } ;
17
+ use crate :: ty:: subst:: { GenericArg , InternalSubsts , Subst , SubstsRef } ;
18
18
use crate :: ty:: util:: { Discr , IntTypeExt } ;
19
19
use rustc_ast:: ast;
20
20
use rustc_attr as attr;
@@ -1061,7 +1061,7 @@ pub enum PredicateKind<'tcx> {
1061
1061
Projection ( PolyProjectionPredicate < ' tcx > ) ,
1062
1062
1063
1063
/// No syntax: `T` well-formed.
1064
- WellFormed ( Ty < ' tcx > ) ,
1064
+ WellFormed ( GenericArg < ' tcx > ) ,
1065
1065
1066
1066
/// Trait must be object-safe.
1067
1067
ObjectSafe ( DefId ) ,
@@ -1079,9 +1079,6 @@ pub enum PredicateKind<'tcx> {
1079
1079
1080
1080
/// Constants must be equal. The first component is the const that is expected.
1081
1081
ConstEquate ( & ' tcx Const < ' tcx > , & ' tcx Const < ' tcx > ) ,
1082
-
1083
- /// Constant must be well formed.
1084
- WellFormedConst ( & ' tcx Const < ' tcx > ) ,
1085
1082
}
1086
1083
1087
1084
/// The crate outlives map is computed during typeck and contains the
@@ -1198,9 +1195,6 @@ impl<'tcx> Predicate<'tcx> {
1198
1195
PredicateKind :: ConstEquate ( c1, c2) => {
1199
1196
PredicateKind :: ConstEquate ( c1. subst ( tcx, substs) , c2. subst ( tcx, substs) )
1200
1197
}
1201
- PredicateKind :: WellFormedConst ( c) => {
1202
- PredicateKind :: WellFormedConst ( c. subst ( tcx, substs) )
1203
- }
1204
1198
} ;
1205
1199
1206
1200
if new != * kind { new. to_predicate ( tcx) } else { self }
@@ -1392,8 +1386,7 @@ impl<'tcx> Predicate<'tcx> {
1392
1386
| PredicateKind :: ClosureKind ( ..)
1393
1387
| PredicateKind :: TypeOutlives ( ..)
1394
1388
| PredicateKind :: ConstEvaluatable ( ..)
1395
- | PredicateKind :: ConstEquate ( ..)
1396
- | PredicateKind :: WellFormedConst ( ..) => None ,
1389
+ | PredicateKind :: ConstEquate ( ..) => None ,
1397
1390
}
1398
1391
}
1399
1392
@@ -1408,8 +1401,7 @@ impl<'tcx> Predicate<'tcx> {
1408
1401
| PredicateKind :: ObjectSafe ( ..)
1409
1402
| PredicateKind :: ClosureKind ( ..)
1410
1403
| PredicateKind :: ConstEvaluatable ( ..)
1411
- | PredicateKind :: ConstEquate ( ..)
1412
- | PredicateKind :: WellFormedConst ( ..) => None ,
1404
+ | PredicateKind :: ConstEquate ( ..) => None ,
1413
1405
}
1414
1406
}
1415
1407
}
0 commit comments