File tree 1 file changed +3
-4
lines changed
src/librustdoc/html/render
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(
598
598
} ;
599
599
600
600
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) ;
604
602
}
605
603
}
606
604
@@ -2463,8 +2461,9 @@ const MAX_FULL_EXAMPLES: usize = 5;
2463
2461
const NUM_VISIBLE_LINES : usize = 10 ;
2464
2462
2465
2463
/// 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 ) {
2467
2465
let tcx = cx. tcx ( ) ;
2466
+ let def_id = item. def_id . expect_def_id ( ) ;
2468
2467
let key = tcx. def_path_hash ( def_id) ;
2469
2468
let call_locations = match cx. shared . call_locations . get ( & key) {
2470
2469
Some ( call_locations) => call_locations,
You can’t perform that action at this time.
0 commit comments