@@ -1244,7 +1244,7 @@ fn is_mixed_projection_predicate<'tcx>(
12441244 let mut projection_ty = projection_predicate. projection_ty ;
12451245 loop {
12461246 match projection_ty. self_ty ( ) . kind ( ) {
1247- ty:: Projection ( inner_projection_ty) => {
1247+ ty:: Alias ( ty :: Projection , inner_projection_ty) => {
12481248 projection_ty = * inner_projection_ty;
12491249 }
12501250 ty:: Param ( param_ty) => {
@@ -1330,7 +1330,7 @@ fn replace_types<'tcx>(
13301330 && let Some ( term_ty) = projection_predicate. term . ty ( )
13311331 && let ty:: Param ( term_param_ty) = term_ty. kind ( )
13321332 {
1333- let item_def_id = projection_predicate. projection_ty . item_def_id ;
1333+ let item_def_id = projection_predicate. projection_ty . def_id ;
13341334 let assoc_item = cx. tcx . associated_item ( item_def_id) ;
13351335 let projection = cx. tcx
13361336 . 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
13901390 continue ;
13911391 } ,
13921392 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)
13961395 } ,
1396+ ty:: Infer ( _)
1397+ | ty:: Error ( _)
1398+ | ty:: Bound ( ..)
1399+ | ty:: Alias ( ty:: Opaque , ..)
1400+ | ty:: Placeholder ( _)
1401+ | ty:: Dynamic ( ..) => Position :: ReborrowStable ( precedence) . into ( ) ,
13971402 ty:: Adt ( ..) if ty. has_placeholders ( ) || ty. has_opaque_types ( ) => {
13981403 Position :: ReborrowStable ( precedence) . into ( )
13991404 } ,
@@ -1417,7 +1422,7 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
14171422 | ty:: Closure ( ..)
14181423 | ty:: Never
14191424 | ty:: Tuple ( _)
1420- | ty:: Projection ( _) => {
1425+ | ty:: Alias ( ty :: Projection , _) => {
14211426 Position :: DerefStable ( precedence, ty. is_sized ( cx. tcx , cx. param_env . without_caller_bounds ( ) ) ) . into ( )
14221427 } ,
14231428 } ;
0 commit comments