@@ -138,7 +138,7 @@ fn compute_components<'tcx>(
138
138
// trait-ref. Therefore, if we see any higher-ranked regions,
139
139
// we simply fallback to the most restrictive rule, which
140
140
// requires that `Pi: 'a` for all `i`.
141
- ty:: Alias ( _ , alias_ty) => {
141
+ ty:: Alias ( ty :: Projection | ty :: Inherent | ty :: Opaque , alias_ty) => {
142
142
if !alias_ty. has_escaping_bound_vars ( ) {
143
143
// best case: no escaping regions, so push the
144
144
// projection and skip the subtree (thus generating no
@@ -171,21 +171,22 @@ fn compute_components<'tcx>(
171
171
// the type and then visits the types that are lexically
172
172
// contained within. (The comments refer to relevant rules
173
173
// from RFC1214.)
174
- ty:: Bool | // OutlivesScalar
175
- ty:: Char | // OutlivesScalar
176
- ty:: Int ( ..) | // OutlivesScalar
177
- ty:: Uint ( ..) | // OutlivesScalar
178
- ty:: Float ( ..) | // OutlivesScalar
179
- ty:: Never | // ...
180
- ty:: Adt ( ..) | // OutlivesNominalType
181
- ty:: Foreign ( ..) | // OutlivesNominalType
182
- ty:: Str | // OutlivesScalar (ish)
183
- ty:: Slice ( ..) | // ...
184
- ty:: RawPtr ( ..) | // ...
185
- ty:: Ref ( ..) | // OutlivesReference
186
- ty:: Tuple ( ..) | // ...
187
- ty:: FnPtr ( _) | // OutlivesFunction (*)
188
- ty:: Dynamic ( ..) | // OutlivesObject, OutlivesFragment (*)
174
+ ty:: Bool | // OutlivesScalar
175
+ ty:: Char | // OutlivesScalar
176
+ ty:: Int ( ..) | // OutlivesScalar
177
+ ty:: Uint ( ..) | // OutlivesScalar
178
+ ty:: Float ( ..) | // OutlivesScalar
179
+ ty:: Never | // ...
180
+ ty:: Adt ( ..) | // OutlivesNominalType
181
+ ty:: Alias ( ty:: Weak , _) | // OutlivesNominalType (ish)
182
+ ty:: Foreign ( ..) | // OutlivesNominalType
183
+ ty:: Str | // OutlivesScalar (ish)
184
+ ty:: Slice ( ..) | // ...
185
+ ty:: RawPtr ( ..) | // ...
186
+ ty:: Ref ( ..) | // OutlivesReference
187
+ ty:: Tuple ( ..) | // ...
188
+ ty:: FnPtr ( _) | // OutlivesFunction (*)
189
+ ty:: Dynamic ( ..) | // OutlivesObject, OutlivesFragment (*)
189
190
ty:: Bound ( ..) |
190
191
ty:: Error ( _) => {
191
192
// (*) Function pointers and trait objects are both binders.
0 commit comments