Skip to content

Commit 4c0d9e4

Browse files
committed
---
yaml --- r: 117971 b: refs/heads/try c: d8467e2 h: refs/heads/master i: 117969: 360a7e9 117967: 61cb97c v: v3
1 parent d8b58d9 commit 4c0d9e4

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3770c42a4959cbabc73da52abc7e3db96657974e
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d6736a1440d42f6af967a8a20ab8d73522112b72
5-
refs/heads/try: c327080ee04e641a34f30ae71b713a91106680b1
5+
refs/heads/try: d8467e23e74fba8447c4a48f75cc9fa78d66b1c3
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/librustc/middle/lint.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ use syntax::parse::token;
7272
use syntax::visit::Visitor;
7373
use syntax::{ast, ast_util, visit};
7474

75-
#[deriving(Clone, Show, Eq, Ord, TotalEq, TotalOrd)]
75+
#[deriving(Clone, Show, Eq, Ord, TotalEq, TotalOrd, Hash)]
7676
pub enum Lint {
7777
CTypes,
7878
UnusedImports,
@@ -471,9 +471,9 @@ struct Context<'a> {
471471
/// Ids of structs/enums which have been checked for raw_pointer_deriving
472472
checked_raw_pointers: NodeSet,
473473

474-
/// Level of EnumSizeVariance lint for each enum, stored here because the
475-
/// body of the lint needs to run in trans.
476-
enum_levels: HashMap<ast::NodeId, (Level, LintSource)>,
474+
/// Level of lints for certain NodeIds, stored here because the body of
475+
/// the lint needs to run in trans.
476+
node_levels: HashMap<(ast::NodeId, Lint), (Level, LintSource)>,
477477
}
478478

479479
pub fn emit_lint(level: Level, src: LintSource, msg: &str, span: Span,
@@ -1921,7 +1921,7 @@ pub fn check_crate(tcx: &ty::ctxt,
19211921
lint_stack: Vec::new(),
19221922
negated_expr_id: -1,
19231923
checked_raw_pointers: NodeSet::new(),
1924-
enum_levels: HashMap::new(),
1924+
node_levels: HashMap::new(),
19251925
};
19261926

19271927
// Install default lint levels, followed by the command line levels, and
@@ -1963,5 +1963,5 @@ pub fn check_crate(tcx: &ty::ctxt,
19631963
}
19641964

19651965
tcx.sess.abort_if_errors();
1966-
*tcx.enum_lint_levels.borrow_mut() = cx.enum_levels;
1966+
*tcx.node_lint_levels.borrow_mut() = cx.node_levels;
19671967
}

branches/try/src/librustc/middle/ty.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ pub struct ctxt {
354354

355355
pub dependency_formats: RefCell<dependency_format::Dependencies>,
356356

357-
pub enum_lint_levels: RefCell<HashMap<ast::NodeId, (lint::Level, lint::LintSource)>>,
357+
pub node_lint_levels: RefCell<HashMap<(ast::NodeId, lint::Lint),
358+
(lint::Level, lint::LintSource)>>,
358359
}
359360

360361
pub enum tbox_flag {
@@ -1137,7 +1138,7 @@ pub fn mk_ctxt(s: Session,
11371138
method_map: RefCell::new(FnvHashMap::new()),
11381139
vtable_map: RefCell::new(FnvHashMap::new()),
11391140
dependency_formats: RefCell::new(HashMap::new()),
1140-
enum_lint_levels: RefCell::new(HashMap::new()),
1141+
node_lint_levels: RefCell::new(HashMap::new()),
11411142
}
11421143
}
11431144

0 commit comments

Comments
 (0)