diff options
| author | Jonas Schievink <jonas@schievink.net> | 2016-07-11 01:21:12 +0200 |
|---|---|---|
| committer | Jonas Schievink <jonas@schievink.net> | 2016-07-11 01:21:12 +0200 |
| commit | 66fb62baf7a655e0b08f2d61f7e186ac0ac18045 (patch) | |
| tree | da98a92c464553668b168e5d1993bd2b1a5d251d | |
| parent | f5d29a3b594719d0303bdffccb8470ebb10b0d3e (diff) | |
| download | rust-66fb62baf7a655e0b08f2d61f7e186ac0ac18045.tar.gz rust-66fb62baf7a655e0b08f2d61f7e186ac0ac18045.zip | |
Get rid of `node_levels` and `node_lint_levels`
| -rw-r--r-- | src/librustc/lint/context.rs | 8 | ||||
| -rw-r--r-- | src/librustc/ty/context.rs | 5 |
2 files changed, 0 insertions, 13 deletions
diff --git a/src/librustc/lint/context.rs b/src/librustc/lint/context.rs index 8d032fd98ba..ce3d72de9ae 100644 --- a/src/librustc/lint/context.rs +++ b/src/librustc/lint/context.rs @@ -35,7 +35,6 @@ use lint::{Default, CommandLine, Node, Allow, Warn, Deny, Forbid}; use lint::builtin; use util::nodemap::FnvHashMap; -use std::cell::RefCell; use std::cmp; use std::default::Default as StdDefault; use std::mem; @@ -311,10 +310,6 @@ pub struct LateContext<'a, 'tcx: 'a> { /// 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 @@ -664,7 +659,6 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> { access_levels: access_levels, lints: lint_store, level_stack: vec![], - node_levels: RefCell::new(FnvHashMap()), } } @@ -1202,8 +1196,6 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, } } - *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); } diff --git a/src/librustc/ty/context.rs b/src/librustc/ty/context.rs index 4c8fa80dd0b..56938a7a838 100644 --- a/src/librustc/ty/context.rs +++ b/src/librustc/ty/context.rs @@ -12,7 +12,6 @@ use dep_graph::{DepGraph, DepTrackingMap}; use session::Session; -use lint; use middle; use middle::cstore::LOCAL_CRATE; use hir::def::DefMap; @@ -415,9 +414,6 @@ pub struct GlobalCtxt<'tcx> { /// 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>>, @@ -726,7 +722,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, '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(), |
