]> git.lizzy.rs Git - rust.git/commitdiff
Fix rustdoc
authorMatthew Jasper <mjjasper1@gmail.com>
Sun, 8 Dec 2019 22:02:33 +0000 (22:02 +0000)
committerMatthew Jasper <mjjasper1@gmail.com>
Sat, 21 Dec 2019 12:35:28 +0000 (12:35 +0000)
src/librustdoc/clean/mod.rs

index e5f684cbca87bffb3b7ab372417e2b430bdc8f4e..dda4a7596a7103fd015e53c37514ad53f94850e0 100644 (file)
@@ -21,7 +21,7 @@
 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 @@ fn clean(&self, cx: &DocContext<'_>) -> WherePredicate {
 
 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"),
         };