@@ -6,7 +6,8 @@ use std::sync::Arc;
6
6
7
7
use rustc_data_structures:: fx:: { FxHashMap , FxIndexSet } ;
8
8
use 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 } ;
10
11
use rustc_serialize:: opaque:: { MemDecoder , MAGIC_END_BYTES } ;
11
12
use rustc_serialize:: { Decodable , Decoder , Encodable , Encoder } ;
12
13
use rustc_session:: StableCrateId ;
@@ -188,11 +189,9 @@ impl<'a, 'tcx> Encoder for EncodeContext<'tcx> {
188
189
}
189
190
}
190
191
191
- impl < ' tcx > TyEncoder for EncodeContext < ' tcx > {
192
+ impl < ' tcx > TyEncoder < ' tcx > for EncodeContext < ' tcx > {
192
193
const CLEAR_CROSS_CRATE : bool = true ;
193
194
194
- type I = TyCtxt < ' tcx > ;
195
-
196
195
fn position ( & self ) -> usize {
197
196
self . encoder . position ( )
198
197
}
@@ -345,13 +344,11 @@ impl<'a, 'tcx> Decoder for DecodeContext<'a, 'tcx> {
345
344
}
346
345
}
347
346
348
- impl < ' a , ' tcx > TyDecoder for DecodeContext < ' a , ' tcx > {
347
+ impl < ' a , ' tcx > TyDecoder < ' tcx > for DecodeContext < ' a , ' tcx > {
349
348
const CLEAR_CROSS_CRATE : bool = true ;
350
349
351
- type I = TyCtxt < ' tcx > ;
352
-
353
350
#[ inline]
354
- fn interner ( & self ) -> Self :: I {
351
+ fn interner ( & self ) -> TyCtxt < ' tcx > {
355
352
self . tcx
356
353
}
357
354
0 commit comments