@@ -72,7 +72,7 @@ use syntax::parse::token;
72
72
use syntax:: visit:: Visitor ;
73
73
use syntax:: { ast, ast_util, visit} ;
74
74
75
- #[ deriving( Clone , Show , Eq , Ord , TotalEq , TotalOrd ) ]
75
+ #[ deriving( Clone , Show , Eq , Ord , TotalEq , TotalOrd , Hash ) ]
76
76
pub enum Lint {
77
77
CTypes ,
78
78
UnusedImports ,
@@ -471,9 +471,9 @@ struct Context<'a> {
471
471
/// Ids of structs/enums which have been checked for raw_pointer_deriving
472
472
checked_raw_pointers : NodeSet ,
473
473
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 ) > ,
477
477
}
478
478
479
479
pub fn emit_lint ( level : Level , src : LintSource , msg : & str , span : Span ,
@@ -1921,7 +1921,7 @@ pub fn check_crate(tcx: &ty::ctxt,
1921
1921
lint_stack : Vec :: new ( ) ,
1922
1922
negated_expr_id : -1 ,
1923
1923
checked_raw_pointers : NodeSet :: new ( ) ,
1924
- enum_levels : HashMap :: new ( ) ,
1924
+ node_levels : HashMap :: new ( ) ,
1925
1925
} ;
1926
1926
1927
1927
// Install default lint levels, followed by the command line levels, and
@@ -1963,5 +1963,5 @@ pub fn check_crate(tcx: &ty::ctxt,
1963
1963
}
1964
1964
1965
1965
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 ;
1967
1967
}
0 commit comments