pub fn represent_type<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
                                t: Ty<'tcx>)
                                -> Rc<Repr<'tcx>> {
    debug!("Representing: {}", t);
    if let Some(repr) = cx.adt_reprs().borrow().get(&t) {
        return repr.clone();
    }

    let repr = Rc::new(represent_type_uncached(cx, t));
    debug!("Represented as: {:?}", repr);
    cx.adt_reprs().borrow_mut().insert(t, repr.clone());
    repr
}
/// Decides how to represent a given type.
Decides how to represent a given type.
Decides how to represent a given type .
pub fn represent_type<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
                                t: Ty<'tcx>)
                                -> Rc<Repr<'tcx>> {
    debug!("Representing: {}", t);
    if let Some(repr) = cx.adt_reprs().borrow().get(&t) {
        return repr.clone();
    }
    let repr = Rc::new(represent_type_uncached(cx, t));
    debug!("Represented as: {:?}", repr);
    cx.adt_reprs().borrow_mut().insert(t, repr.clone());
    repr
}
pub fn represent_type < ' a , ' tcx > ( cx : & CrateContext < ' a , ' tcx > , t : Ty < ' tcx > ) -> Rc < Repr < ' tcx > > { debug ! ( " " t ) ; if let Some ( repr ) = cx . adt_reprs ( ) . borrow ( ) . get ( & t ) { return repr . clone ( ) ; } let repr = Rc :: new ( represent_type_uncached ( cx , t ) ) ; debug ! ( " " repr ) ; cx . adt_reprs ( ) . borrow_mut ( ) . insert ( t , repr . clone ( ) ) ; repr }
Decides how to represent a given type.
Decides how to represent a given type .
cx
&CrateContext<'a, 'tcx>
t
Ty<'tcx>
cx
&CrateContext<'a, 'tcx>
t
Ty<'tcx>