Skip to content

Commit 4558d50

Browse files
committed
Update TyEncoder/Decoder changes
1 parent 5718eac commit 4558d50

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/serde.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use std::sync::Arc;
66

77
use rustc_data_structures::fx::{FxHashMap, FxIndexSet};
88
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};
1011
use rustc_serialize::opaque::{MemDecoder, MAGIC_END_BYTES};
1112
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
1213
use 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

Comments
 (0)