Skip to content

Commit

Permalink
Get rid of node_levels and node_lint_levels
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Jul 10, 2016
1 parent f5d29a3 commit 66fb62b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions src/librustc/lint/context.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()),
}
}

Expand Down Expand Up @@ -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);
}
Expand Down
5 changes: 0 additions & 5 deletions src/librustc/ty/context.rs
Expand Up @@ -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;
Expand Down Expand Up @@ -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>>,

Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 66fb62b

Please sign in to comment.