@@ -35,7 +35,6 @@ use crate::util::common::time;
35
35
use errors:: DiagnosticBuilder ;
36
36
use std:: slice;
37
37
use rustc_data_structures:: sync:: { self , ParallelIterator , join, par_iter} ;
38
- use rustc_serialize:: { Decoder , Decodable , Encoder , Encodable } ;
39
38
use syntax:: ast;
40
39
use syntax:: util:: lev_distance:: find_best_match_for_name;
41
40
use syntax:: visit as ast_visit;
@@ -71,7 +70,7 @@ pub struct LintStore {
71
70
72
71
/// Lints that are buffered up early on in the `Session` before the
73
72
/// `LintLevels` is calculated
74
- #[ derive( PartialEq , RustcEncodable , RustcDecodable , Debug ) ]
73
+ #[ derive( PartialEq , Debug ) ]
75
74
pub struct BufferedEarlyLint {
76
75
pub lint_id : LintId ,
77
76
pub ast_id : ast:: NodeId ,
@@ -1574,27 +1573,3 @@ pub fn check_ast_crate<T: EarlyLintPass>(
1574
1573
}
1575
1574
}
1576
1575
}
1577
-
1578
- impl Encodable for LintId {
1579
- fn encode < S : Encoder > ( & self , s : & mut S ) -> Result < ( ) , S :: Error > {
1580
- s. emit_str ( & self . lint . name . to_lowercase ( ) )
1581
- }
1582
- }
1583
-
1584
- impl Decodable for LintId {
1585
- #[ inline]
1586
- fn decode < D : Decoder > ( d : & mut D ) -> Result < LintId , D :: Error > {
1587
- let s = d. read_str ( ) ?;
1588
- ty:: tls:: with ( |tcx| {
1589
- match tcx. lint_store . find_lints ( & s) {
1590
- Ok ( ids) => {
1591
- if ids. len ( ) != 0 {
1592
- panic ! ( "invalid lint-id `{}`" , s) ;
1593
- }
1594
- Ok ( ids[ 0 ] )
1595
- }
1596
- Err ( _) => panic ! ( "invalid lint-id `{}`" , s) ,
1597
- }
1598
- } )
1599
- }
1600
- }
0 commit comments