pub struct EncodeContext<'tcx> {
opaque: opaque::Encoder,
- pub tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
+ pub tcx: TyCtxt<'tcx>,
entries_index: Index<'tcx>,
}
}
-impl<'tcx, T: Encodable> SpecializedEncoder<mir::ClearCrossCrate<T>>
-for EncodeContext<'tcx> {
+impl<'tcx, T: Encodable> SpecializedEncoder<mir::ClearCrossCrate<T>> for EncodeContext<'tcx> {
fn specialized_encode(&mut self,
_: &mir::ClearCrossCrate<T>)
-> Result<(), Self::Error> {
}
impl<'tcx> EncodeContext<'tcx> {
-
fn emit_node<F: FnOnce(&mut Self, usize) -> R, R>(&mut self, f: F) -> R {
assert_eq!(self.lazy_state, LazyState::NoNode);
let pos = self.position();
}
struct ImplVisitor<'tcx> {
- tcx: TyCtxt<'tcx, 'tcx, 'tcx>,
+ tcx: TyCtxt<'tcx>,
impls: FxHashMap<DefId, Vec<DefIndex>>,
}
// will allow us to slice the metadata to the precise length that we just
// generated regardless of trailing bytes that end up in it.
-pub fn encode_metadata<'tcx>(tcx: TyCtxt<'tcx, 'tcx, 'tcx>)
- -> EncodedMetadata
-{
+pub fn encode_metadata<'tcx>(tcx: TyCtxt<'tcx>) -> EncodedMetadata {
let mut encoder = opaque::Encoder::new(vec![]);
encoder.emit_raw_bytes(METADATA_HEADER);
EncodedMetadata { raw_data: result }
}
-pub fn get_repr_options<'tcx, 'gcx>(tcx: TyCtxt<'gcx, 'tcx, 'gcx>, did: DefId) -> ReprOptions {
+pub fn get_repr_options<'tcx>(tcx: TyCtxt<'tcx>, did: DefId) -> ReprOptions {
let ty = tcx.type_of(did);
match ty.sty {
ty::Adt(ref def, _) => return def.repr,