This repository was archived by the owner on May 28, 2025. It is now read-only.
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 @@ -210,9 +210,6 @@ where
210210 }
211211 }
212212 }
213- ty:: Alias ( ty:: Weak , alias) => {
214- self . def_id_visitor . visit_def_id ( alias. def_id , "type alias" , & ty) ;
215- }
216213 ty:: Alias ( ty:: Projection , proj) => {
217214 if V :: SKIP_ASSOC_TYS {
218215 // Visitors searching for minimal visibility/reachability want to
@@ -225,7 +222,7 @@ where
225222 // This will also visit args if necessary, so we don't need to recurse.
226223 return self . visit_projection_ty ( proj) ;
227224 }
228- ty:: Alias ( ty:: Inherent , data) => {
225+ ty:: Alias ( kind @ ( ty:: Inherent | ty :: Weak ) , data) => {
229226 if V :: SKIP_ASSOC_TYS {
230227 // Visitors searching for minimal visibility/reachability want to
231228 // conservatively approximate associated types like `Type::Alias`
@@ -237,7 +234,11 @@ where
237234
238235 self . def_id_visitor . visit_def_id (
239236 data. def_id ,
240- "associated type" ,
237+ match kind {
238+ ty:: Inherent => "associated type" ,
239+ ty:: Weak => "type alias" ,
240+ _ => unreachable ! ( ) ,
241+ } ,
241242 & LazyDefPathStr { def_id : data. def_id , tcx } ,
242243 ) ?;
243244
You can’t perform that action at this time.
0 commit comments