From c1c6e99bfd3296954a192d9fe3151a222dd9045c Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Tue, 26 Apr 2016 14:06:24 +1200 Subject: [PATCH] rebasing Note that this whole PR is a [breaking-change] for clients of the Compiler API. --- src/librustc_driver/lib.rs | 1 - src/librustc_driver/pretty.rs | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index dc181d106f488..ceb851da530ac 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -462,7 +462,6 @@ impl<'a> CompilerCalls<'a> for RustcDefaultCalls { }; control.after_write_deps.callback = box move |state| { pretty::print_after_write_deps(state.session, - state.cstore.unwrap(), state.ast_map.unwrap(), state.input, &state.expanded_crate.take().unwrap(), diff --git a/src/librustc_driver/pretty.rs b/src/librustc_driver/pretty.rs index 4e07728807643..30f943bd9a444 100644 --- a/src/librustc_driver/pretty.rs +++ b/src/librustc_driver/pretty.rs @@ -26,8 +26,6 @@ use rustc::session::config::Input; use rustc_borrowck as borrowck; use rustc_borrowck::graphviz as borrowck_dot; use rustc_resolve as resolve; -use rustc_metadata::cstore::CStore; -use rustc_metadata::creader::LocalCrateReader; use rustc_mir::pretty::write_mir_pretty; use rustc_mir::graphviz::write_mir_graphviz; @@ -42,7 +40,6 @@ use syntax::util::small_vector::SmallVector; use graphviz as dot; -use std::cell::RefCell; use std::fs::File; use std::io::{self, Write}; use std::iter; @@ -813,7 +810,6 @@ pub fn print_after_parsing(sess: &Session, } pub fn print_after_write_deps<'tcx, 'a: 'tcx>(sess: &'a Session, - cstore: &CStore, ast_map: &hir_map::Map<'tcx>, input: &Input, krate: &ast::Crate, @@ -826,7 +822,7 @@ pub fn print_after_write_deps<'tcx, 'a: 'tcx>(sess: &'a Session, let _ignore = dep_graph.in_ignore(); if ppm.needs_analysis() { - print_with_analysis(sess, cstore, ast_map, crate_name, arenas, ppm, opt_uii, ofile); + print_with_analysis(sess, ast_map, crate_name, arenas, ppm, opt_uii, ofile); return; } @@ -917,7 +913,6 @@ pub fn print_after_write_deps<'tcx, 'a: 'tcx>(sess: &'a Session, // with a different callback than the standard driver, so that isn't easy. // Instead, we call that function ourselves. fn print_with_analysis<'tcx, 'a: 'tcx>(sess: &'a Session, - cstore: &CStore, ast_map: &hir_map::Map<'tcx>, crate_name: &str, arenas: &'tcx ty::CtxtArenas<'tcx>,