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
207
207
}
208
208
}
209
209
}
210
- ty:: Alias ( ty:: Weak , alias) => {
211
- self . def_id_visitor . visit_def_id ( alias. def_id , "type alias" , & ty) ;
212
- }
213
210
ty:: Alias ( ty:: Projection , proj) => {
214
211
if V :: SKIP_ASSOC_TYS {
215
212
// Visitors searching for minimal visibility/reachability want to
@@ -222,7 +219,7 @@ where
222
219
// This will also visit args if necessary, so we don't need to recurse.
223
220
return self . visit_projection_ty ( proj) ;
224
221
}
225
- ty:: Alias ( ty:: Inherent , data) => {
222
+ ty:: Alias ( kind @ ( ty:: Inherent | ty :: Weak ) , data) => {
226
223
if V :: SKIP_ASSOC_TYS {
227
224
// Visitors searching for minimal visibility/reachability want to
228
225
// conservatively approximate associated types like `Type::Alias`
@@ -234,7 +231,11 @@ where
234
231
235
232
self . def_id_visitor . visit_def_id (
236
233
data. def_id ,
237
- "associated type" ,
234
+ match kind {
235
+ ty:: Inherent => "associated type" ,
236
+ ty:: Weak => "type alias" ,
237
+ _ => unreachable ! ( ) ,
238
+ } ,
238
239
& LazyDefPathStr { def_id : data. def_id , tcx } ,
239
240
) ?;
240
241
You can’t perform that action at this time.
0 commit comments