diff options
| author | Eduard Burtescu <edy.burt@gmail.com> | 2016-10-04 02:19:40 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-02-25 17:07:59 +0200 |
| commit | 4649f7387ea334901c78dd48c1e1659ecf80cfcc (patch) | |
| tree | 99261bc24e0a8ba2128f654f9caf352883fb6e24 /src/librustc_save_analysis | |
| parent | 374ea14412fbb35ca344b7d7cbe67405d63e0e42 (diff) | |
| download | rust-4649f7387ea334901c78dd48c1e1659ecf80cfcc.tar.gz rust-4649f7387ea334901c78dd48c1e1659ecf80cfcc.zip | |
rustc_typeck: lift CrateCtxt to TyCtxt.
Diffstat (limited to 'src/librustc_save_analysis')
| -rw-r--r-- | src/librustc_save_analysis/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_save_analysis/lib.rs b/src/librustc_save_analysis/lib.rs index ddc60fe5f81..b1e435dcc75 100644 --- a/src/librustc_save_analysis/lib.rs +++ b/src/librustc_save_analysis/lib.rs @@ -85,7 +85,7 @@ pub mod recorder { pub struct SaveContext<'l, 'tcx: 'l> { tcx: TyCtxt<'l, 'tcx, 'tcx>, tables: &'l ty::TypeckTables<'tcx>, - analysis: &'l ty::CrateAnalysis<'tcx>, + analysis: &'l ty::CrateAnalysis, span_utils: SpanUtils<'tcx>, } @@ -550,7 +550,7 @@ impl<'l, 'tcx: 'l> SaveContext<'l, 'tcx> { match *qpath { hir::QPath::Resolved(_, ref path) => path.def, hir::QPath::TypeRelative(..) => { - if let Some(ty) = self.analysis.hir_ty_to_ty.get(&id) { + if let Some(ty) = self.tcx.ast_ty_to_ty_cache.borrow().get(&id) { if let ty::TyProjection(proj) = ty.sty { for item in self.tcx.associated_items(proj.trait_ref.def_id) { if item.kind == ty::AssociatedKind::Type { @@ -854,7 +854,7 @@ impl Format { pub fn process_crate<'l, 'tcx>(tcx: TyCtxt<'l, 'tcx, 'tcx>, krate: &ast::Crate, - analysis: &'l ty::CrateAnalysis<'tcx>, + analysis: &'l ty::CrateAnalysis, cratename: &str, odir: Option<&Path>, format: Format) { |
