@@ -9,7 +9,7 @@ pub fn anonymize_predicate<'tcx>(
99 tcx : TyCtxt < ' tcx > ,
1010 pred : ty:: Predicate < ' tcx > ,
1111) -> ty:: Predicate < ' tcx > {
12- let new = tcx. anonymize_late_bound_regions ( pred. bound_atom ( ) ) ;
12+ let new = tcx. anonymize_late_bound_regions ( pred. kind ( ) ) ;
1313 tcx. reuse_or_mk_predicate ( pred, new)
1414}
1515
@@ -121,9 +121,9 @@ impl Elaborator<'tcx> {
121121 fn elaborate ( & mut self , obligation : & PredicateObligation < ' tcx > ) {
122122 let tcx = self . visited . tcx ;
123123
124- let bound_predicate = obligation. predicate . bound_atom ( ) ;
124+ let bound_predicate = obligation. predicate . kind ( ) ;
125125 match bound_predicate. skip_binder ( ) {
126- ty:: PredicateAtom :: Trait ( data, _) => {
126+ ty:: PredicateKind :: Trait ( data, _) => {
127127 // Get predicates declared on the trait.
128128 let predicates = tcx. super_predicates_of ( data. def_id ( ) ) ;
129129
@@ -145,36 +145,36 @@ impl Elaborator<'tcx> {
145145
146146 self . stack . extend ( obligations) ;
147147 }
148- ty:: PredicateAtom :: WellFormed ( ..) => {
148+ ty:: PredicateKind :: WellFormed ( ..) => {
149149 // Currently, we do not elaborate WF predicates,
150150 // although we easily could.
151151 }
152- ty:: PredicateAtom :: ObjectSafe ( ..) => {
152+ ty:: PredicateKind :: ObjectSafe ( ..) => {
153153 // Currently, we do not elaborate object-safe
154154 // predicates.
155155 }
156- ty:: PredicateAtom :: Subtype ( ..) => {
156+ ty:: PredicateKind :: Subtype ( ..) => {
157157 // Currently, we do not "elaborate" predicates like `X <: Y`,
158158 // though conceivably we might.
159159 }
160- ty:: PredicateAtom :: Projection ( ..) => {
160+ ty:: PredicateKind :: Projection ( ..) => {
161161 // Nothing to elaborate in a projection predicate.
162162 }
163- ty:: PredicateAtom :: ClosureKind ( ..) => {
163+ ty:: PredicateKind :: ClosureKind ( ..) => {
164164 // Nothing to elaborate when waiting for a closure's kind to be inferred.
165165 }
166- ty:: PredicateAtom :: ConstEvaluatable ( ..) => {
166+ ty:: PredicateKind :: ConstEvaluatable ( ..) => {
167167 // Currently, we do not elaborate const-evaluatable
168168 // predicates.
169169 }
170- ty:: PredicateAtom :: ConstEquate ( ..) => {
170+ ty:: PredicateKind :: ConstEquate ( ..) => {
171171 // Currently, we do not elaborate const-equate
172172 // predicates.
173173 }
174- ty:: PredicateAtom :: RegionOutlives ( ..) => {
174+ ty:: PredicateKind :: RegionOutlives ( ..) => {
175175 // Nothing to elaborate from `'a: 'b`.
176176 }
177- ty:: PredicateAtom :: TypeOutlives ( ty:: OutlivesPredicate ( ty_max, r_min) ) => {
177+ ty:: PredicateKind :: TypeOutlives ( ty:: OutlivesPredicate ( ty_max, r_min) ) => {
178178 // We know that `T: 'a` for some type `T`. We can
179179 // often elaborate this. For example, if we know that
180180 // `[U]: 'a`, that implies that `U: 'a`. Similarly, if
@@ -204,15 +204,15 @@ impl Elaborator<'tcx> {
204204 if r. is_late_bound ( ) {
205205 None
206206 } else {
207- Some ( ty:: PredicateAtom :: RegionOutlives ( ty:: OutlivesPredicate (
207+ Some ( ty:: PredicateKind :: RegionOutlives ( ty:: OutlivesPredicate (
208208 r, r_min,
209209 ) ) )
210210 }
211211 }
212212
213213 Component :: Param ( p) => {
214214 let ty = tcx. mk_ty_param ( p. index , p. name ) ;
215- Some ( ty:: PredicateAtom :: TypeOutlives ( ty:: OutlivesPredicate (
215+ Some ( ty:: PredicateKind :: TypeOutlives ( ty:: OutlivesPredicate (
216216 ty, r_min,
217217 ) ) )
218218 }
@@ -237,7 +237,7 @@ impl Elaborator<'tcx> {
237237 } ) ,
238238 ) ;
239239 }
240- ty:: PredicateAtom :: TypeWellFormedFromEnv ( ..) => {
240+ ty:: PredicateKind :: TypeWellFormedFromEnv ( ..) => {
241241 // Nothing to elaborate
242242 }
243243 }
0 commit comments