@@ -1244,7 +1244,7 @@ fn is_mixed_projection_predicate<'tcx>(
1244
1244
let mut projection_ty = projection_predicate. projection_ty ;
1245
1245
loop {
1246
1246
match projection_ty. self_ty ( ) . kind ( ) {
1247
- ty:: Projection ( inner_projection_ty) => {
1247
+ ty:: Alias ( ty :: Projection , inner_projection_ty) => {
1248
1248
projection_ty = * inner_projection_ty;
1249
1249
}
1250
1250
ty:: Param ( param_ty) => {
@@ -1330,7 +1330,7 @@ fn replace_types<'tcx>(
1330
1330
&& let Some ( term_ty) = projection_predicate. term . ty ( )
1331
1331
&& let ty:: Param ( term_param_ty) = term_ty. kind ( )
1332
1332
{
1333
- let item_def_id = projection_predicate. projection_ty . item_def_id ;
1333
+ let item_def_id = projection_predicate. projection_ty . def_id ;
1334
1334
let assoc_item = cx. tcx . associated_item ( item_def_id) ;
1335
1335
let projection = cx. tcx
1336
1336
. mk_projection ( assoc_item. def_id , cx. tcx . mk_substs_trait ( new_ty, [ ] ) ) ;
@@ -1390,10 +1390,15 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
1390
1390
continue ;
1391
1391
} ,
1392
1392
ty:: Param ( _) => TyPosition :: new_deref_stable_for_result ( precedence, ty) ,
1393
- ty:: Projection ( _) if ty. has_non_region_param ( ) => TyPosition :: new_deref_stable_for_result ( precedence, ty) ,
1394
- ty:: Infer ( _) | ty:: Error ( _) | ty:: Bound ( ..) | ty:: Opaque ( ..) | ty:: Placeholder ( _) | ty:: Dynamic ( ..) => {
1395
- Position :: ReborrowStable ( precedence) . into ( )
1393
+ ty:: Alias ( ty:: Projection , _) if ty. has_non_region_param ( ) => {
1394
+ TyPosition :: new_deref_stable_for_result ( precedence, ty)
1396
1395
} ,
1396
+ ty:: Infer ( _)
1397
+ | ty:: Error ( _)
1398
+ | ty:: Bound ( ..)
1399
+ | ty:: Alias ( ty:: Opaque , ..)
1400
+ | ty:: Placeholder ( _)
1401
+ | ty:: Dynamic ( ..) => Position :: ReborrowStable ( precedence) . into ( ) ,
1397
1402
ty:: Adt ( ..) if ty. has_placeholders ( ) || ty. has_opaque_types ( ) => {
1398
1403
Position :: ReborrowStable ( precedence) . into ( )
1399
1404
} ,
@@ -1417,7 +1422,7 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
1417
1422
| ty:: Closure ( ..)
1418
1423
| ty:: Never
1419
1424
| ty:: Tuple ( _)
1420
- | ty:: Projection ( _) => {
1425
+ | ty:: Alias ( ty :: Projection , _) => {
1421
1426
Position :: DerefStable ( precedence, ty. is_sized ( cx. tcx , cx. param_env . without_caller_bounds ( ) ) ) . into ( )
1422
1427
} ,
1423
1428
} ;
0 commit comments