Move next_node_id to Resolver
This doesn't migrate the pretty-printing everybody loops, which will be done in the next few commits.
This commit is contained in:
parent
5a5027519a
commit
516a817dbd
12 changed files with 64 additions and 64 deletions
|
|
@ -27,5 +27,6 @@ rustc_save_analysis = { path = "../librustc_save_analysis" }
|
|||
rustc_codegen_utils = { path = "../librustc_codegen_utils" }
|
||||
rustc_interface = { path = "../librustc_interface" }
|
||||
rustc_serialize = { path = "../libserialize", package = "serialize" }
|
||||
rustc_resolve = { path = "../librustc_resolve" }
|
||||
syntax = { path = "../libsyntax" }
|
||||
syntax_pos = { path = "../libsyntax_pos" }
|
||||
|
|
|
|||
|
|
@ -291,7 +291,6 @@ pub fn run_compiler(
|
|||
|
||||
if let Some((ppm, opt_uii)) = pretty_info {
|
||||
if ppm.needs_ast_map(&opt_uii) {
|
||||
pretty::visit_crate(sess, &mut compiler.parse()?.peek_mut(), ppm);
|
||||
compiler.global_ctxt()?.peek_mut().enter(|tcx| {
|
||||
let expanded_crate = compiler.expansion()?.take().0;
|
||||
pretty::print_after_hir_lowering(
|
||||
|
|
@ -305,8 +304,7 @@ pub fn run_compiler(
|
|||
Ok(())
|
||||
})?;
|
||||
} else {
|
||||
let mut krate = compiler.parse()?.take();
|
||||
pretty::visit_crate(sess, &mut krate, ppm);
|
||||
let krate = compiler.parse()?.take();
|
||||
pretty::print_after_parsing(
|
||||
sess,
|
||||
&compiler.input(),
|
||||
|
|
|
|||
|
|
@ -8,11 +8,9 @@ use rustc::session::Session;
|
|||
use rustc::session::config::Input;
|
||||
use rustc::ty::{self, TyCtxt};
|
||||
use rustc::util::common::ErrorReported;
|
||||
use rustc_interface::util::ReplaceBodyWithLoop;
|
||||
use rustc_mir::util::{write_mir_pretty, write_mir_graphviz};
|
||||
|
||||
use syntax::ast;
|
||||
use syntax::mut_visit::MutVisitor;
|
||||
use syntax::print::{pprust};
|
||||
use syntax_pos::FileName;
|
||||
|
||||
|
|
@ -572,12 +570,6 @@ impl UserIdentifiedItem {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn visit_crate(sess: &Session, krate: &mut ast::Crate, ppm: PpMode) {
|
||||
if let PpmSource(PpmEveryBodyLoops) = ppm {
|
||||
ReplaceBodyWithLoop::new(sess).visit_crate(krate);
|
||||
}
|
||||
}
|
||||
|
||||
fn get_source(input: &Input, sess: &Session) -> (String, FileName) {
|
||||
let src_name = source_name(input);
|
||||
let src = String::clone(&sess.source_map()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue