@@ -1699,7 +1699,7 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
16991699 let self_type = clean_ty ( qself, cx) ;
17001700
17011701 let ( trait_, should_fully_qualify) = match ty. kind ( ) {
1702- ty:: Alias ( ty:: Projection , proj ) => {
1702+ ty:: Alias ( proj @ ty:: AliasTy { kind : ty :: Projection { .. } , .. } ) => {
17031703 let res = Res :: Def ( DefKind :: Trait , proj. trait_ref ( cx. tcx ) . def_id ) ;
17041704 let trait_ = clean_path ( & hir:: Path { span, res, segments : & [ ] } , cx) ;
17051705 register_res ( cx, trait_. res ) ;
@@ -1709,7 +1709,7 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
17091709
17101710 ( Some ( trait_) , should_fully_qualify)
17111711 }
1712- ty:: Alias ( ty:: Inherent , _ ) => ( None , false ) ,
1712+ ty:: Alias ( ty:: AliasTy { kind : ty :: Inherent { .. } , .. } ) => ( None , false ) ,
17131713 // Rustdoc handles `ty::Error`s by turning them into `Type::Infer`s.
17141714 ty:: Error ( _) => return Type :: Infer ,
17151715 _ => bug ! ( "clean: expected associated type, found `{ty:?}`" ) ,
@@ -2186,7 +2186,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
21862186 Tuple ( t. iter ( ) . map ( |t| clean_middle_ty ( bound_ty. rebind ( t) , cx, None , None ) ) . collect ( ) )
21872187 }
21882188
2189- ty:: Alias ( ty:: Projection , alias_ty @ ty:: AliasTy { def_id, args, .. } ) => {
2189+ ty:: Alias ( alias_ty @ ty:: AliasTy { kind : ty:: Projection { def_id } , args, .. } ) => {
21902190 if cx. tcx . is_impl_trait_in_trait ( def_id) {
21912191 clean_middle_opaque_bounds ( cx, def_id, args)
21922192 } else {
@@ -2198,7 +2198,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
21982198 }
21992199 }
22002200
2201- ty:: Alias ( ty:: Inherent , alias_ty @ ty:: AliasTy { def_id, .. } ) => {
2201+ ty:: Alias ( alias_ty @ ty:: AliasTy { kind : ty:: Inherent { def_id } , .. } ) => {
22022202 let alias_ty = bound_ty. rebind ( alias_ty) ;
22032203 let self_type = clean_middle_ty ( alias_ty. map_bound ( |ty| ty. self_ty ( ) ) , cx, None , None ) ;
22042204
@@ -2221,7 +2221,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
22212221 } ) )
22222222 }
22232223
2224- ty:: Alias ( ty:: Free , ty:: AliasTy { def_id, args, .. } ) => {
2224+ ty:: Alias ( ty:: AliasTy { kind : ty:: Free { def_id } , args, .. } ) => {
22252225 if cx. tcx . features ( ) . lazy_type_alias ( ) {
22262226 // Free type alias `data` represents the `type X` in `type X = Y`. If we need `Y`,
22272227 // we need to use `type_of`.
@@ -2249,7 +2249,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
22492249 ty:: BoundTyKind :: Anon => panic ! ( "unexpected anonymous bound type variable" ) ,
22502250 } ,
22512251
2252- ty:: Alias ( ty:: Opaque , ty:: AliasTy { def_id, args, .. } ) => {
2252+ ty:: Alias ( ty:: AliasTy { kind : ty:: Opaque { def_id } , args, .. } ) => {
22532253 // If it's already in the same alias, don't get an infinite loop.
22542254 if cx. current_type_aliases . contains_key ( & def_id) {
22552255 let path =
0 commit comments