File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/librustdoc/html/render Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -598,9 +598,7 @@ fn document_full_inner(
598598 } ;
599599
600600 if let clean:: ItemKind :: FunctionItem ( ..) | clean:: ItemKind :: MethodItem ( ..) = kind {
601- if let Some ( def_id) = item. def_id . as_def_id ( ) {
602- render_call_locations ( w, cx, def_id, item) ;
603- }
601+ render_call_locations ( w, cx, item) ;
604602 }
605603}
606604
@@ -2463,8 +2461,9 @@ const MAX_FULL_EXAMPLES: usize = 5;
24632461const NUM_VISIBLE_LINES : usize = 10 ;
24642462
24652463/// Generates the HTML for example call locations generated via the --scrape-examples flag.
2466- fn render_call_locations ( w : & mut Buffer , cx : & Context < ' _ > , def_id : DefId , item : & clean:: Item ) {
2464+ fn render_call_locations ( w : & mut Buffer , cx : & Context < ' _ > , item : & clean:: Item ) {
24672465 let tcx = cx. tcx ( ) ;
2466+ let def_id = item. def_id . expect_def_id ( ) ;
24682467 let key = tcx. def_path_hash ( def_id) ;
24692468 let call_locations = match cx. shared . call_locations . get ( & key) {
24702469 Some ( call_locations) => call_locations,
You can’t perform that action at this time.
0 commit comments