@@ -35,7 +35,6 @@ use crate::util::common::time;
3535use errors:: DiagnosticBuilder ;
3636use std:: slice;
3737use rustc_data_structures:: sync:: { self , ParallelIterator , join, par_iter} ;
38- use rustc_serialize:: { Decoder , Decodable , Encoder , Encodable } ;
3938use syntax:: ast;
4039use syntax:: util:: lev_distance:: find_best_match_for_name;
4140use syntax:: visit as ast_visit;
@@ -71,7 +70,7 @@ pub struct LintStore {
7170
7271/// Lints that are buffered up early on in the `Session` before the
7372/// `LintLevels` is calculated
74- #[ derive( PartialEq , RustcEncodable , RustcDecodable , Debug ) ]
73+ #[ derive( PartialEq , Debug ) ]
7574pub struct BufferedEarlyLint {
7675 pub lint_id : LintId ,
7776 pub ast_id : ast:: NodeId ,
@@ -1574,27 +1573,3 @@ pub fn check_ast_crate<T: EarlyLintPass>(
15741573 }
15751574 }
15761575}
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