Skip to content

Commit 66fb62b

Browse files
Get rid of node_levels and node_lint_levels
1 parent f5d29a3 commit 66fb62b

File tree

2 files changed

+0
-13
lines changed

2 files changed

+0
-13
lines changed

src/librustc/lint/context.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ use lint::{Default, CommandLine, Node, Allow, Warn, Deny, Forbid};
3535
use lint::builtin;
3636
use util::nodemap::FnvHashMap;
3737

38-
use std::cell::RefCell;
3938
use std::cmp;
4039
use std::default::Default as StdDefault;
4140
use std::mem;
@@ -311,10 +310,6 @@ pub struct LateContext<'a, 'tcx: 'a> {
311310
/// levels, this stack keeps track of the previous lint levels of whatever
312311
/// was modified.
313312
level_stack: Vec<(LintId, LevelSource)>,
314-
315-
/// Level of lints for certain NodeIds, stored here because the body of
316-
/// the lint needs to run in trans.
317-
node_levels: RefCell<FnvHashMap<(ast::NodeId, LintId), LevelSource>>,
318313
}
319314

320315
/// Context for lint checking of the AST, after expansion, before lowering to
@@ -664,7 +659,6 @@ impl<'a, 'tcx> LateContext<'a, 'tcx> {
664659
access_levels: access_levels,
665660
lints: lint_store,
666661
level_stack: vec![],
667-
node_levels: RefCell::new(FnvHashMap()),
668662
}
669663
}
670664

@@ -1202,8 +1196,6 @@ pub fn check_crate<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
12021196
}
12031197
}
12041198

1205-
*tcx.node_lint_levels.borrow_mut() = cx.node_levels.into_inner();
1206-
12071199
// Put the lint store back in the session.
12081200
mem::replace(&mut *tcx.sess.lint_store.borrow_mut(), cx.lints);
12091201
}

src/librustc/ty/context.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
1313
use dep_graph::{DepGraph, DepTrackingMap};
1414
use session::Session;
15-
use lint;
1615
use middle;
1716
use middle::cstore::LOCAL_CRATE;
1817
use hir::def::DefMap;
@@ -415,9 +414,6 @@ pub struct GlobalCtxt<'tcx> {
415414
/// Cache used by const_eval when decoding extern const fns
416415
pub extern_const_fns: RefCell<DefIdMap<NodeId>>,
417416

418-
pub node_lint_levels: RefCell<FnvHashMap<(NodeId, lint::LintId),
419-
lint::LevelSource>>,
420-
421417
/// Maps any item's def-id to its stability index.
422418
pub stability: RefCell<stability::Index<'tcx>>,
423419

@@ -726,7 +722,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> {
726722
populated_external_primitive_impls: RefCell::new(DefIdSet()),
727723
extern_const_statics: RefCell::new(DefIdMap()),
728724
extern_const_fns: RefCell::new(DefIdMap()),
729-
node_lint_levels: RefCell::new(FnvHashMap()),
730725
stability: RefCell::new(stability),
731726
selection_cache: traits::SelectionCache::new(),
732727
evaluation_cache: traits::EvaluationCache::new(),

0 commit comments

Comments
 (0)