diff options
| author | ljedrz <ljedrz@gmail.com> | 2019-06-27 11:16:59 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2019-07-04 12:29:26 +0200 |
| commit | 4f7ba515c2bfacde6f09e860c3cc9f37bb742481 (patch) | |
| tree | a54f2b9a82afa41bcf8816176cb00202d841eb5c /src/librustdoc | |
| parent | 7987719dbe7158df9304932ce5fb9145715626cb (diff) | |
| download | rust-4f7ba515c2bfacde6f09e860c3cc9f37bb742481.tar.gz rust-4f7ba515c2bfacde6f09e860c3cc9f37bb742481.zip | |
rename hir::map::local_def_id to local_def_id_from_node_id
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 8ae96d86657..e6e57eb230a 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -654,7 +654,7 @@ impl Clean<Item> for doctree::Module<'_> { visibility: self.vis.clean(cx), stability: self.stab.clean(cx), deprecation: self.depr.clean(cx), - def_id: cx.tcx.hir().local_def_id(self.id), + def_id: cx.tcx.hir().local_def_id_from_node_id(self.id), inner: ModuleItem(Module { is_crate: self.is_crate, items, @@ -2982,10 +2982,11 @@ impl<'tcx> Clean<Type> for Ty<'tcx> { ty::FnPtr(_) => { let ty = cx.tcx.lift(self).expect("FnPtr lift failed"); let sig = ty.fn_sig(cx.tcx); + let local_def_id = cx.tcx.hir().local_def_id_from_node_id(ast::CRATE_NODE_ID); BareFunction(box BareFunctionDecl { unsafety: sig.unsafety(), generic_params: Vec::new(), - decl: (cx.tcx.hir().local_def_id(ast::CRATE_NODE_ID), sig).clean(cx), + decl: (local_def_id, sig).clean(cx), abi: sig.abi(), }) } @@ -3991,7 +3992,7 @@ impl Clean<Vec<Item>> for doctree::Import<'_> { name: None, attrs: self.attrs.clean(cx), source: self.whence.clean(cx), - def_id: cx.tcx.hir().local_def_id(ast::CRATE_NODE_ID), + def_id: cx.tcx.hir().local_def_id_from_node_id(ast::CRATE_NODE_ID), visibility: self.vis.clean(cx), stability: None, deprecation: None, |
