about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-12-08 22:02:33 +0000
committerMatthew Jasper <mjjasper1@gmail.com>2019-12-21 12:35:28 +0000
commite7b8bfe5b9f09a6c587ebe170abdf84a7bce26fa (patch)
treeefa8ef0c68009c72467b7b012d45486d51cea71c
parentc2687985b0e15a954ca0459acfbfd08a14f93eb0 (diff)
downloadrust-e7b8bfe5b9f09a6c587ebe170abdf84a7bce26fa.tar.gz
rust-e7b8bfe5b9f09a6c587ebe170abdf84a7bce26fa.zip
Fix rustdoc
-rw-r--r--src/librustdoc/clean/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index e5f684cbca8..dda4a7596a7 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -21,7 +21,7 @@ use rustc::hir::def::{CtorKind, DefKind, Res};
 use rustc::hir::def_id::{CrateNum, DefId, CRATE_DEF_INDEX};
 use rustc::hir::ptr::P;
 use rustc::ty::subst::InternalSubsts;
-use rustc::ty::{self, TyCtxt, Ty, AdtKind};
+use rustc::ty::{self, TyCtxt, Ty, AdtKind, Lift};
 use rustc::ty::fold::TypeFolder;
 use rustc::util::nodemap::{FxHashMap, FxHashSet};
 use syntax::ast::{self, Ident};
@@ -551,7 +551,8 @@ impl<'tcx> Clean<WherePredicate> for ty::ProjectionPredicate<'tcx> {
 
 impl<'tcx> Clean<Type> for ty::ProjectionTy<'tcx> {
     fn clean(&self, cx: &DocContext<'_>) -> Type {
-        let trait_ = match self.trait_ref(cx.tcx).clean(cx) {
+        let lifted = self.lift_to_tcx(cx.tcx).unwrap();
+        let trait_ = match lifted.trait_ref(cx.tcx).clean(cx) {
             GenericBound::TraitBound(t, _) => t.trait_,
             GenericBound::Outlives(_) => panic!("cleaning a trait got a lifetime"),
         };