File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ rustc_errors = { path = "../librustc_errors" }
2121rustc_lint = { path = " ../librustc_lint" }
2222rustc_metadata = { path = " ../librustc_metadata" }
2323rustc_resolve = { path = " ../librustc_resolve" }
24+ rustc_typeck = { path = " ../librustc_typeck" }
2425rustc_trans = { path = " ../librustc_trans" }
2526serialize = { path = " ../libserialize" }
2627syntax = { path = " ../libsyntax" }
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ use rustc::ty::subst::Substs;
3636use rustc:: ty:: { self , AdtKind } ;
3737use rustc:: middle:: stability;
3838use rustc:: util:: nodemap:: { FxHashMap , FxHashSet } ;
39+ use rustc_typeck:: hir_ty_to_ty;
3940
4041use rustc:: hir;
4142
@@ -1779,10 +1780,9 @@ impl Clean<Type> for hir::Ty {
17791780 }
17801781 TyPath ( hir:: QPath :: TypeRelative ( ref qself, ref segment) ) => {
17811782 let mut def = Def :: Err ;
1782- if let Some ( ty) = cx. tcx . ast_ty_to_ty_cache . borrow ( ) . get ( & self . id ) {
1783- if let ty:: TyProjection ( proj) = ty. sty {
1784- def = Def :: Trait ( proj. trait_ref . def_id ) ;
1785- }
1783+ let ty = hir_ty_to_ty ( cx. tcx , self ) ;
1784+ if let ty:: TyProjection ( proj) = ty. sty {
1785+ def = Def :: Trait ( proj. trait_ref . def_id ) ;
17861786 }
17871787 let trait_path = hir:: Path {
17881788 span : self . span ,
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ extern crate rustc_resolve;
4141extern crate rustc_lint;
4242extern crate rustc_back;
4343extern crate rustc_metadata;
44+ extern crate rustc_typeck;
4445extern crate serialize;
4546#[ macro_use] extern crate syntax;
4647extern crate syntax_pos;
You can’t perform that action at this time.
0 commit comments