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" }
21
21
rustc_lint = { path = " ../librustc_lint" }
22
22
rustc_metadata = { path = " ../librustc_metadata" }
23
23
rustc_resolve = { path = " ../librustc_resolve" }
24
+ rustc_typeck = { path = " ../librustc_typeck" }
24
25
rustc_trans = { path = " ../librustc_trans" }
25
26
serialize = { path = " ../libserialize" }
26
27
syntax = { path = " ../libsyntax" }
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ use rustc::ty::subst::Substs;
36
36
use rustc:: ty:: { self , AdtKind } ;
37
37
use rustc:: middle:: stability;
38
38
use rustc:: util:: nodemap:: { FxHashMap , FxHashSet } ;
39
+ use rustc_typeck:: hir_ty_to_ty;
39
40
40
41
use rustc:: hir;
41
42
@@ -1779,10 +1780,9 @@ impl Clean<Type> for hir::Ty {
1779
1780
}
1780
1781
TyPath ( hir:: QPath :: TypeRelative ( ref qself, ref segment) ) => {
1781
1782
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 ) ;
1786
1786
}
1787
1787
let trait_path = hir:: Path {
1788
1788
span : self . span ,
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ extern crate rustc_resolve;
41
41
extern crate rustc_lint;
42
42
extern crate rustc_back;
43
43
extern crate rustc_metadata;
44
+ extern crate rustc_typeck;
44
45
extern crate serialize;
45
46
#[ macro_use] extern crate syntax;
46
47
extern crate syntax_pos;
You can’t perform that action at this time.
0 commit comments