@@ -6,7 +6,8 @@ use std::sync::Arc;
66
77use rustc_data_structures:: fx:: { FxHashMap , FxIndexSet } ;
88use rustc_middle:: mir:: interpret:: { self , AllocDecodingState , AllocId } ;
9- use rustc_middle:: ty:: { self , Ty , TyCtxt , TyDecoder , TyEncoder } ;
9+ use rustc_middle:: ty:: codec:: { TyDecoder , TyEncoder } ;
10+ use rustc_middle:: ty:: { self , Ty , TyCtxt } ;
1011use rustc_serialize:: opaque:: { MemDecoder , MAGIC_END_BYTES } ;
1112use rustc_serialize:: { Decodable , Decoder , Encodable , Encoder } ;
1213use rustc_session:: StableCrateId ;
@@ -188,11 +189,9 @@ impl<'a, 'tcx> Encoder for EncodeContext<'tcx> {
188189 }
189190}
190191
191- impl < ' tcx > TyEncoder for EncodeContext < ' tcx > {
192+ impl < ' tcx > TyEncoder < ' tcx > for EncodeContext < ' tcx > {
192193 const CLEAR_CROSS_CRATE : bool = true ;
193194
194- type I = TyCtxt < ' tcx > ;
195-
196195 fn position ( & self ) -> usize {
197196 self . encoder . position ( )
198197 }
@@ -345,13 +344,11 @@ impl<'a, 'tcx> Decoder for DecodeContext<'a, 'tcx> {
345344 }
346345}
347346
348- impl < ' a , ' tcx > TyDecoder for DecodeContext < ' a , ' tcx > {
347+ impl < ' a , ' tcx > TyDecoder < ' tcx > for DecodeContext < ' a , ' tcx > {
349348 const CLEAR_CROSS_CRATE : bool = true ;
350349
351- type I = TyCtxt < ' tcx > ;
352-
353350 #[ inline]
354- fn interner ( & self ) -> Self :: I {
351+ fn interner ( & self ) -> TyCtxt < ' tcx > {
355352 self . tcx
356353 }
357354
0 commit comments