Skip to content

Commit b9ba521

Browse files
committed
Fix librustdoc error due to as_local_hir_id changes
1 parent fe75315 commit b9ba521

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustdoc/html/markdown.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,8 @@ impl<'a, 'b> ExtraInfo<'a, 'b> {
646646
let hir_id = match (self.hir_id, self.item_did) {
647647
(Some(h), _) => h,
648648
(None, Some(item_did)) => {
649-
match self.tcx.hir().as_local_hir_id(item_did) {
650-
Some(hir_id) => hir_id,
649+
match item_did.as_local() {
650+
Some(item_did) => self.tcx.hir().as_local_hir_id(item_did),
651651
None => {
652652
// If non-local, no need to check anything.
653653
return;

0 commit comments

Comments
 (0)