Skip to content

Commit 41453d2

Browse files
committed
collector: clarify dependencies
1 parent 3eb83f2 commit 41453d2

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/librustc/hir/map/collector.rs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
use super::*;
2-
use crate::dep_graph::{DepGraph, DepKind, DepNodeIndex};
3-
use crate::hir::intravisit::{NestedVisitorMap, Visitor};
4-
use crate::hir::map::HirEntryMap;
5-
use crate::ich::Fingerprint;
1+
use crate::dep_graph::{DepGraph, DepKind, DepNode, DepNodeIndex};
2+
use crate::hir::intravisit::{self, NestedVisitorMap, Visitor};
3+
use crate::hir::map::definitions::{self, DefPathHash};
4+
use crate::hir::map::{Entry, HirEntryMap};
5+
use crate::ich::StableHashingContext;
66
use crate::middle::cstore::CrateStore;
7+
use rustc_data_structures::fingerprint::Fingerprint;
78
use rustc_data_structures::fx::FxHashMap;
9+
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
810
use rustc_data_structures::svh::Svh;
911
use rustc_hir as hir;
12+
use rustc_hir::def_id::CRATE_DEF_INDEX;
1013
use rustc_hir::def_id::{CrateNum, DefIndex, LOCAL_CRATE};
14+
use rustc_hir::*;
1115
use rustc_index::vec::IndexVec;
1216
use rustc_session::{CrateDisambiguator, Session};
1317
use rustc_span::source_map::SourceMap;
14-
use rustc_span::{Span, Symbol};
15-
use std::iter::repeat;
18+
use rustc_span::{Span, Symbol, DUMMY_SP};
1619
use syntax::ast::NodeId;
1720

18-
use crate::ich::StableHashingContext;
19-
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
21+
use std::iter::repeat;
2022

2123
/// A visitor that walks over the HIR and collects `Node`s into a HIR map.
2224
pub(super) struct NodeCollector<'a, 'hir> {

src/librustc/hir/map/definitions.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//! There are also some rather random cases (like const initializer
55
//! expressions) that are mostly just leftovers.
66
7-
use crate::ich::Fingerprint;
7+
use rustc_data_structures::fingerprint::Fingerprint;
88
use rustc_data_structures::fx::FxHashMap;
99
use rustc_data_structures::stable_hasher::StableHasher;
1010
use rustc_hir as hir;
@@ -15,10 +15,11 @@ use rustc_session::CrateDisambiguator;
1515
use rustc_span::hygiene::ExpnId;
1616
use rustc_span::symbol::{sym, Symbol};
1717
use rustc_span::Span;
18+
use syntax::ast;
19+
1820
use std::borrow::Borrow;
1921
use std::fmt::Write;
2022
use std::hash::Hash;
21-
use syntax::ast;
2223

2324
/// The `DefPathTable` maps `DefIndex`es to `DefKey`s and vice versa.
2425
/// Internally the `DefPathTable` holds a tree of `DefKey`s, where each `DefKey`

src/librustc/hir/map/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use rustc_index::vec::IndexVec;
1818
use rustc_span::hygiene::MacroKind;
1919
use rustc_span::source_map::Spanned;
2020
use rustc_span::symbol::kw;
21-
use rustc_span::{Span, DUMMY_SP};
21+
use rustc_span::Span;
2222
use rustc_target::spec::abi::Abi;
2323
use syntax::ast::{self, Name, NodeId};
2424

0 commit comments

Comments
 (0)