Skip to content

Commit 432b043

Browse files
committed
Move import to top of function
1 parent 71fe8f7 commit 432b043

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,8 @@ fn is_derive_trait_collision<T>(ns: &PerNS<Option<(Res, T)>>) -> bool {
448448

449449
impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
450450
fn fold_item(&mut self, mut item: Item) -> Option<Item> {
451+
use rustc_middle::ty::DefIdTree;
452+
451453
let item_hir_id = if item.is_mod() {
452454
if let Some(def_id) = item.def_id.as_local() {
453455
Some(self.cx.tcx.hir().as_local_hir_id(def_id))
@@ -459,7 +461,6 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
459461
None
460462
};
461463

462-
use rustc_middle::ty::DefIdTree;
463464
let parent_node = if item.is_fake() {
464465
// FIXME: is this correct?
465466
None

0 commit comments

Comments
 (0)