@@ -32,7 +32,7 @@ use std::mem;
32
32
use std:: num:: NonZeroUsize ;
33
33
use std:: u32;
34
34
35
- use rustc_serialize:: { Decodable , Decoder , Encodable , SpecializedDecoder , opaque} ;
35
+ use rustc_serialize:: { Decodable , Decoder , SpecializedDecoder , opaque} ;
36
36
use syntax:: attr;
37
37
use syntax:: ast:: { self , Ident } ;
38
38
use syntax:: source_map:: { self , respan, Spanned } ;
@@ -217,15 +217,15 @@ impl<'a, 'tcx> Metadata<'a, 'tcx> for (&'a CrateMetadata, TyCtxt<'tcx>) {
217
217
}
218
218
}
219
219
220
- impl < ' a , ' tcx , T : Encodable + Decodable > Lazy < T > {
220
+ impl < ' a , ' tcx , T : Decodable > Lazy < T > {
221
221
fn decode < M : Metadata < ' a , ' tcx > > ( self , metadata : M ) -> T {
222
222
let mut dcx = metadata. decoder ( self . position . get ( ) ) ;
223
223
dcx. lazy_state = LazyState :: NodeStart ( self . position ) ;
224
224
T :: decode ( & mut dcx) . unwrap ( )
225
225
}
226
226
}
227
227
228
- impl < ' a : ' x , ' tcx : ' x , ' x , T : Encodable + Decodable > Lazy < [ T ] > {
228
+ impl < ' a : ' x , ' tcx : ' x , ' x , T : Decodable > Lazy < [ T ] > {
229
229
fn decode < M : Metadata < ' a , ' tcx > > (
230
230
self ,
231
231
metadata : M ,
@@ -324,13 +324,13 @@ impl<'a, 'tcx> TyDecoder<'tcx> for DecodeContext<'a, 'tcx> {
324
324
}
325
325
}
326
326
327
- impl < ' a , ' tcx , T : Encodable > SpecializedDecoder < Lazy < T > > for DecodeContext < ' a , ' tcx > {
327
+ impl < ' a , ' tcx , T > SpecializedDecoder < Lazy < T > > for DecodeContext < ' a , ' tcx > {
328
328
fn specialized_decode ( & mut self ) -> Result < Lazy < T > , Self :: Error > {
329
329
self . read_lazy_with_meta ( ( ) )
330
330
}
331
331
}
332
332
333
- impl < ' a , ' tcx , T : Encodable > SpecializedDecoder < Lazy < [ T ] > > for DecodeContext < ' a , ' tcx > {
333
+ impl < ' a , ' tcx , T > SpecializedDecoder < Lazy < [ T ] > > for DecodeContext < ' a , ' tcx > {
334
334
fn specialized_decode ( & mut self ) -> Result < Lazy < [ T ] > , Self :: Error > {
335
335
let len = self . read_usize ( ) ?;
336
336
if len == 0 {
0 commit comments