@@ -14,7 +14,7 @@ use crate::mir::Body;
1414use crate :: mir:: GeneratorLayout ;
1515use crate :: traits:: { self , Reveal } ;
1616use crate :: ty;
17- use crate :: ty:: subst:: { InternalSubsts , Subst , SubstsRef } ;
17+ use crate :: ty:: subst:: { GenericArg , InternalSubsts , Subst , SubstsRef } ;
1818use crate :: ty:: util:: { Discr , IntTypeExt } ;
1919use rustc_ast:: ast;
2020use rustc_attr as attr;
@@ -1061,7 +1061,7 @@ pub enum PredicateKind<'tcx> {
10611061 Projection ( PolyProjectionPredicate < ' tcx > ) ,
10621062
10631063 /// No syntax: `T` well-formed.
1064- WellFormed ( Ty < ' tcx > ) ,
1064+ WellFormed ( GenericArg < ' tcx > ) ,
10651065
10661066 /// Trait must be object-safe.
10671067 ObjectSafe ( DefId ) ,
@@ -1079,9 +1079,6 @@ pub enum PredicateKind<'tcx> {
10791079
10801080 /// Constants must be equal. The first component is the const that is expected.
10811081 ConstEquate ( & ' tcx Const < ' tcx > , & ' tcx Const < ' tcx > ) ,
1082-
1083- /// Constant must be well formed.
1084- WellFormedConst ( & ' tcx Const < ' tcx > ) ,
10851082}
10861083
10871084/// The crate outlives map is computed during typeck and contains the
@@ -1198,9 +1195,6 @@ impl<'tcx> Predicate<'tcx> {
11981195 PredicateKind :: ConstEquate ( c1, c2) => {
11991196 PredicateKind :: ConstEquate ( c1. subst ( tcx, substs) , c2. subst ( tcx, substs) )
12001197 }
1201- PredicateKind :: WellFormedConst ( c) => {
1202- PredicateKind :: WellFormedConst ( c. subst ( tcx, substs) )
1203- }
12041198 } ;
12051199
12061200 if new != * kind { new. to_predicate ( tcx) } else { self }
@@ -1392,8 +1386,7 @@ impl<'tcx> Predicate<'tcx> {
13921386 | PredicateKind :: ClosureKind ( ..)
13931387 | PredicateKind :: TypeOutlives ( ..)
13941388 | PredicateKind :: ConstEvaluatable ( ..)
1395- | PredicateKind :: ConstEquate ( ..)
1396- | PredicateKind :: WellFormedConst ( ..) => None ,
1389+ | PredicateKind :: ConstEquate ( ..) => None ,
13971390 }
13981391 }
13991392
@@ -1408,8 +1401,7 @@ impl<'tcx> Predicate<'tcx> {
14081401 | PredicateKind :: ObjectSafe ( ..)
14091402 | PredicateKind :: ClosureKind ( ..)
14101403 | PredicateKind :: ConstEvaluatable ( ..)
1411- | PredicateKind :: ConstEquate ( ..)
1412- | PredicateKind :: WellFormedConst ( ..) => None ,
1404+ | PredicateKind :: ConstEquate ( ..) => None ,
14131405 }
14141406 }
14151407}
0 commit comments