use lint::builtin;
use util::nodemap::FnvHashMap;
-use std::cell::RefCell;
use std::cmp;
use std::default::Default as StdDefault;
use std::mem;
/// levels, this stack keeps track of the previous lint levels of whatever
/// was modified.
level_stack: Vec<(LintId, LevelSource)>,
-
- /// Level of lints for certain NodeIds, stored here because the body of
- /// the lint needs to run in trans.
- node_levels: RefCell<FnvHashMap<(ast::NodeId, LintId), LevelSource>>,
}
/// Context for lint checking of the AST, after expansion, before lowering to
access_levels: access_levels,
lints: lint_store,
level_stack: vec![],
- node_levels: RefCell::new(FnvHashMap()),
}
}
}
}
- *tcx.node_lint_levels.borrow_mut() = cx.node_levels.into_inner();
-
// Put the lint store back in the session.
mem::replace(&mut *tcx.sess.lint_store.borrow_mut(), cx.lints);
}
use dep_graph::{DepGraph, DepTrackingMap};
use session::Session;
-use lint;
use middle;
use middle::cstore::LOCAL_CRATE;
use hir::def::DefMap;
/// Cache used by const_eval when decoding extern const fns
pub extern_const_fns: RefCell<DefIdMap<NodeId>>,
- pub node_lint_levels: RefCell<FnvHashMap<(NodeId, lint::LintId),
- lint::LevelSource>>,
-
/// Maps any item's def-id to its stability index.
pub stability: RefCell<stability::Index<'tcx>>,
populated_external_primitive_impls: RefCell::new(DefIdSet()),
extern_const_statics: RefCell::new(DefIdMap()),
extern_const_fns: RefCell::new(DefIdMap()),
- node_lint_levels: RefCell::new(FnvHashMap()),
stability: RefCell::new(stability),
selection_cache: traits::SelectionCache::new(),
evaluation_cache: traits::EvaluationCache::new(),