File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -355,20 +355,20 @@ pub fn provide<'tcx>(providers: &mut Providers<'tcx>) {
355355 return ;
356356 }
357357
358- let child = child. res . def_id ( ) ;
359-
360- match visible_parent_map. entry ( child) {
361- Entry :: Occupied ( mut entry) => {
362- // If `child` is defined in crate `cnum`, ensure
363- // that it is mapped to a parent in `cnum`.
364- if child. krate == cnum && entry. get ( ) . krate != cnum {
358+ if let Some ( child) = child. res . opt_def_id ( ) {
359+ match visible_parent_map. entry ( child) {
360+ Entry :: Occupied ( mut entry) => {
361+ // If `child` is defined in crate `cnum`, ensure
362+ // that it is mapped to a parent in `cnum`.
363+ if child. krate == cnum && entry. get ( ) . krate != cnum {
364+ entry. insert ( parent) ;
365+ }
366+ }
367+ Entry :: Vacant ( entry) => {
365368 entry. insert ( parent) ;
369+ bfs_queue. push_back ( child) ;
366370 }
367371 }
368- Entry :: Vacant ( entry) => {
369- entry. insert ( parent) ;
370- bfs_queue. push_back ( child) ;
371- }
372372 }
373373 } ;
374374
You can’t perform that action at this time.
0 commit comments