pub fn encoded_ty<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                            t: Ty<'tcx>,
                            def_id_to_string: for<'b> fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String)
                            -> Vec<u8> {
    let mut wr = Cursor::new(Vec::new());
    tyencode::enc_ty(&mut wr, &tyencode::ctxt {
        diag: tcx.sess.diagnostic(),
        ds: def_id_to_string,
        tcx: tcx,
        abbrevs: &RefCell::new(FnvHashMap())
    }, t);
    wr.into_inner()
}
// Get the encoded string for a type
Get the encoded string for a type
Get the encoded string for a type
pub fn encoded_ty<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
                            t: Ty<'tcx>,
                            def_id_to_string: for<'b> fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String)
                            -> Vec<u8> {
    let mut wr = Cursor::new(Vec::new());
    tyencode::enc_ty(&mut wr, &tyencode::ctxt {
        diag: tcx.sess.diagnostic(),
        ds: def_id_to_string,
        tcx: tcx,
        abbrevs: &RefCell::new(FnvHashMap())
    }, t);
    wr.into_inner()
}
pub fn encoded_ty < ' a , ' tcx > ( tcx : TyCtxt < ' a , ' tcx , ' tcx > , t : Ty < ' tcx > , def_id_to_string : for < ' b > fn ( TyCtxt < ' b , ' tcx , ' tcx > , DefId ) -> String ) -> Vec < u8 > { let mut wr = Cursor :: new ( Vec :: new ( ) ) ; tyencode :: enc_ty ( & mut wr , & tyencode :: ctxt { diag : tcx . sess . diagnostic ( ) , ds : def_id_to_string , tcx : tcx , abbrevs : & RefCell :: new ( FnvHashMap ( ) ) } , t ) ; wr . into_inner ( ) }
Get the encoded string for a type
Get the encoded string for a type
tcx
TyCtxt<'a, 'tcx, 'tcx>
t
Ty<'tcx>
def_id_to_string
for<'b> fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String
tcx
TyCtxt<'a, 'tcx, 'tcx>
t
Ty<'tcx>
def_id_to_string
for<'b> fn(TyCtxt<'b, 'tcx, 'tcx>, DefId) -> String