rustc_typeck: lift CrateCtxt to TyCtxt.

This commit is contained in:
Eduard Burtescu
2016-10-04 02:19:40 +03:00
committed by Eduard-Mihai Burtescu
parent 374ea14412
commit 4649f7387e
24 changed files with 653 additions and 759 deletions

View File

@@ -1772,7 +1772,7 @@ impl Clean<Type> for hir::Ty {
}
TyPath(hir::QPath::TypeRelative(ref qself, ref segment)) => {
let mut def = Def::Err;
if let Some(ty) = cx.hir_ty_to_ty.get(&self.id) {
if let Some(ty) = cx.tcx.ast_ty_to_ty_cache.borrow().get(&self.id) {
if let ty::TyProjection(proj) = ty.sty {
def = Def::Trait(proj.trait_ref.def_id);
}