File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
compiler/rustc_privacy/src Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -207,9 +207,6 @@ where
207207 }
208208 }
209209 }
210- ty:: Alias ( ty:: Weak , alias) => {
211- self . def_id_visitor . visit_def_id ( alias. def_id , "type alias" , & ty) ;
212- }
213210 ty:: Alias ( ty:: Projection , proj) => {
214211 if V :: SKIP_ASSOC_TYS {
215212 // Visitors searching for minimal visibility/reachability want to
@@ -222,7 +219,7 @@ where
222219 // This will also visit args if necessary, so we don't need to recurse.
223220 return self . visit_projection_ty ( proj) ;
224221 }
225- ty:: Alias ( ty:: Inherent , data) => {
222+ ty:: Alias ( kind @ ( ty:: Inherent | ty :: Weak ) , data) => {
226223 if V :: SKIP_ASSOC_TYS {
227224 // Visitors searching for minimal visibility/reachability want to
228225 // conservatively approximate associated types like `Type::Alias`
@@ -234,7 +231,11 @@ where
234231
235232 self . def_id_visitor . visit_def_id (
236233 data. def_id ,
237- "associated type" ,
234+ match kind {
235+ ty:: Inherent => "associated type" ,
236+ ty:: Weak => "type alias" ,
237+ _ => unreachable ! ( ) ,
238+ } ,
238239 & LazyDefPathStr { def_id : data. def_id , tcx } ,
239240 ) ?;
240241
You can’t perform that action at this time.
0 commit comments