@@ -189,14 +189,14 @@ pub struct DeepRejectCtxt {
189
189
}
190
190
191
191
impl DeepRejectCtxt {
192
- pub fn args_refs_may_unify < ' tcx > (
192
+ pub fn args_may_unify < ' tcx > (
193
193
self ,
194
194
obligation_args : GenericArgsRef < ' tcx > ,
195
195
impl_args : GenericArgsRef < ' tcx > ,
196
196
) -> bool {
197
197
iter:: zip ( obligation_args, impl_args) . all ( |( obl, imp) | {
198
198
match ( obl. unpack ( ) , imp. unpack ( ) ) {
199
- // We don't fast reject based on regions for now .
199
+ // We don't fast reject based on regions.
200
200
( GenericArgKind :: Lifetime ( _) , GenericArgKind :: Lifetime ( _) ) => true ,
201
201
( GenericArgKind :: Type ( obl) , GenericArgKind :: Type ( imp) ) => {
202
202
self . types_may_unify ( obl, imp)
@@ -231,7 +231,7 @@ impl DeepRejectCtxt {
231
231
| ty:: Never
232
232
| ty:: Tuple ( ..)
233
233
| ty:: FnPtr ( ..)
234
- | ty:: Foreign ( ..) => { }
234
+ | ty:: Foreign ( ..) => debug_assert ! ( impl_ty . is_known_rigid ( ) ) ,
235
235
ty:: FnDef ( ..)
236
236
| ty:: Closure ( ..)
237
237
| ty:: Coroutine ( ..)
@@ -260,7 +260,7 @@ impl DeepRejectCtxt {
260
260
} ,
261
261
ty:: Adt ( obl_def, obl_args) => match k {
262
262
& ty:: Adt ( impl_def, impl_args) => {
263
- obl_def == impl_def && self . args_refs_may_unify ( obl_args, impl_args)
263
+ obl_def == impl_def && self . args_may_unify ( obl_args, impl_args)
264
264
}
265
265
_ => false ,
266
266
} ,
0 commit comments