From 986dd077eabd5b4bb313ed2e3b864106f8076fc0 Mon Sep 17 00:00:00 2001 From: king6cong Date: Mon, 30 Jan 2017 10:12:10 +0800 Subject: [PATCH 1/2] doc comment reword --- src/librustc_driver/driver.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index a7188f6da1ff9..5603ecb1c0419 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -780,7 +780,7 @@ pub fn phase_2_configure_and_expand(sess: &Session, hir_map::Forest::new(hir_crate, &sess.dep_graph) }); - // Discard hygiene data, which isn't required past lowering to HIR. + // Discard hygiene data, which isn't required after lowering to HIR. if !keep_hygiene_data(sess) { syntax::ext::hygiene::reset_hygiene_data(); } From 701c32ed4ab5014671f7237ab115817b9130d3bb Mon Sep 17 00:00:00 2001 From: king6cong Date: Mon, 30 Jan 2017 10:22:26 +0800 Subject: [PATCH 2/2] unify time_passes argument passing --- src/librustc_driver/driver.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 5603ecb1c0419..a04a5b106b8f1 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -741,15 +741,15 @@ pub fn phase_2_configure_and_expand(sess: &Session, "checking for inline asm in case the target doesn't support it", || no_asm::check_crate(sess, &krate)); - time(sess.time_passes(), + time(time_passes, "early lint checks", || lint::check_ast_crate(sess, &krate)); - time(sess.time_passes(), + time(time_passes, "AST validation", || ast_validation::check_crate(sess, &krate)); - time(sess.time_passes(), "name resolution", || -> CompileResult { + time(time_passes, "name resolution", || -> CompileResult { // Since import resolution will eventually happen in expansion, // don't perform `after_expand` until after import resolution. after_expand(&krate)?; @@ -770,7 +770,7 @@ pub fn phase_2_configure_and_expand(sess: &Session, })?; // Lower ast -> hir. - let hir_forest = time(sess.time_passes(), "lowering ast -> hir", || { + let hir_forest = time(time_passes, "lowering ast -> hir", || { let hir_crate = lower_crate(sess, &krate, &mut resolver); if sess.opts.debugging_opts.hir_stats {