//! Rust AST Visitor. Extracts useful information and massages it into a form
//! usable for clean
-use std::collections::HashSet;
use std::mem;
use syntax::abi;
use rustc::hir::map as hir_map;
use rustc::hir::def::Def;
use rustc::middle::privacy::AccessLevel;
+use rustc::util::nodemap::FnvHashSet;
use rustc::hir;
pub module: Module,
pub attrs: hir::HirVec<ast::Attribute>,
pub cx: &'a core::DocContext<'a, 'tcx>,
- view_item_stack: HashSet<ast::NodeId>,
+ view_item_stack: FnvHashSet<ast::NodeId>,
inlining_from_glob: bool,
}
impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
pub fn new(cx: &'a core::DocContext<'a, 'tcx>) -> RustdocVisitor<'a, 'tcx> {
// If the root is reexported, terminate all recursion.
- let mut stack = HashSet::new();
+ let mut stack = FnvHashSet();
stack.insert(ast::CRATE_NODE_ID);
RustdocVisitor {
module: Module::new(None),