File tree 2 files changed +15
-24
lines changed
rustc_trait_selection/src/traits
2 files changed +15
-24
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ impl FlagComputation {
178
178
179
179
& ty:: Alias ( ty:: Projection , data) => {
180
180
self . add_flags ( TypeFlags :: HAS_TY_PROJECTION ) ;
181
- self . add_projection_ty ( data) ;
181
+ self . add_alias_ty ( data) ;
182
182
}
183
183
184
184
& ty:: Alias ( ty:: Opaque , ty:: AliasTy { substs, .. } ) => {
@@ -267,7 +267,7 @@ impl FlagComputation {
267
267
projection_ty,
268
268
term,
269
269
} ) ) => {
270
- self . add_projection_ty ( projection_ty) ;
270
+ self . add_alias_ty ( projection_ty) ;
271
271
self . add_term ( term) ;
272
272
}
273
273
ty:: PredicateKind :: WellFormed ( arg) => {
@@ -372,8 +372,8 @@ impl FlagComputation {
372
372
}
373
373
}
374
374
375
- fn add_projection_ty ( & mut self , projection_ty : ty:: AliasTy < ' _ > ) {
376
- self . add_substs ( projection_ty . substs ) ;
375
+ fn add_alias_ty ( & mut self , alias_ty : ty:: AliasTy < ' _ > ) {
376
+ self . add_substs ( alias_ty . substs ) ;
377
377
}
378
378
379
379
fn add_substs ( & mut self , substs : & [ GenericArg < ' _ > ] ) {
Original file line number Diff line number Diff line change @@ -170,29 +170,20 @@ pub fn predicate_obligations<'tcx>(
170
170
ty:: PredicateKind :: WellFormed ( arg) => {
171
171
wf. compute ( arg) ;
172
172
}
173
- ty:: PredicateKind :: ObjectSafe ( _) => { }
174
- ty:: PredicateKind :: ClosureKind ( ..) => { }
175
- ty:: PredicateKind :: Subtype ( ty:: SubtypePredicate { a, b, a_is_expected : _ } ) => {
176
- wf. compute ( a. into ( ) ) ;
177
- wf. compute ( b. into ( ) ) ;
178
- }
179
- ty:: PredicateKind :: Coerce ( ty:: CoercePredicate { a, b } ) => {
180
- wf. compute ( a. into ( ) ) ;
181
- wf. compute ( b. into ( ) ) ;
182
- }
173
+
183
174
ty:: PredicateKind :: ConstEvaluatable ( ct) => {
184
175
wf. compute ( ct. into ( ) ) ;
185
176
}
186
- ty :: PredicateKind :: ConstEquate ( c1 , c2 ) => {
187
- wf . compute ( c1 . into ( ) ) ;
188
- wf . compute ( c2 . into ( ) ) ;
189
- }
190
- ty:: PredicateKind :: Ambiguous => { }
191
- ty:: PredicateKind :: TypeWellFormedFromEnv ( ..) => {
192
- bug ! ( "TypeWellFormedFromEnv is only used for Chalk" )
193
- }
194
- ty:: PredicateKind :: AliasRelate ( ..) => {
195
- bug ! ( "We should only wf check where clauses and `AliasRelate` is not a `Clause` " )
177
+
178
+ ty :: PredicateKind :: ObjectSafe ( _ )
179
+ | ty :: PredicateKind :: ClosureKind ( .. )
180
+ | ty :: PredicateKind :: Subtype ( .. )
181
+ | ty:: PredicateKind :: Coerce ( .. )
182
+ | ty:: PredicateKind :: ConstEquate ( ..)
183
+ | ty :: PredicateKind :: Ambiguous
184
+ | ty :: PredicateKind :: AliasRelate ( .. )
185
+ | ty:: PredicateKind :: TypeWellFormedFromEnv ( ..) => {
186
+ bug ! ( "We should only wf check where clauses, unexpected predicate: {predicate:?} " )
196
187
}
197
188
}
198
189
You can’t perform that action at this time.
0 commit comments