File tree 1 file changed +6
-5
lines changed
compiler/rustc_privacy/src
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -210,9 +210,6 @@ where
210
210
}
211
211
}
212
212
}
213
- ty:: Alias ( ty:: Weak , alias) => {
214
- self . def_id_visitor . visit_def_id ( alias. def_id , "type alias" , & ty) ;
215
- }
216
213
ty:: Alias ( ty:: Projection , proj) => {
217
214
if V :: SKIP_ASSOC_TYS {
218
215
// Visitors searching for minimal visibility/reachability want to
@@ -225,7 +222,7 @@ where
225
222
// This will also visit args if necessary, so we don't need to recurse.
226
223
return self . visit_projection_ty ( proj) ;
227
224
}
228
- ty:: Alias ( ty:: Inherent , data) => {
225
+ ty:: Alias ( kind @ ( ty:: Inherent | ty :: Weak ) , data) => {
229
226
if V :: SKIP_ASSOC_TYS {
230
227
// Visitors searching for minimal visibility/reachability want to
231
228
// conservatively approximate associated types like `Type::Alias`
@@ -237,7 +234,11 @@ where
237
234
238
235
self . def_id_visitor . visit_def_id (
239
236
data. def_id ,
240
- "associated type" ,
237
+ match kind {
238
+ ty:: Inherent => "associated type" ,
239
+ ty:: Weak => "type alias" ,
240
+ _ => unreachable ! ( ) ,
241
+ } ,
241
242
& LazyDefPathStr { def_id : data. def_id , tcx } ,
242
243
) ?;
243
244
You can’t perform that action at this time.
0 commit comments