diff options
| author | king6cong <king6cong@gmail.com> | 2017-01-30 10:22:26 +0800 |
|---|---|---|
| committer | king6cong <king6cong@gmail.com> | 2017-01-30 10:22:26 +0800 |
| commit | 701c32ed4ab5014671f7237ab115817b9130d3bb (patch) | |
| tree | c652a9c4a3e876470c0c41aef39e96b7a7bb6b8a | |
| parent | 986dd077eabd5b4bb313ed2e3b864106f8076fc0 (diff) | |
| download | rust-701c32ed4ab5014671f7237ab115817b9130d3bb.tar.gz rust-701c32ed4ab5014671f7237ab115817b9130d3bb.zip | |
unify time_passes argument passing
| -rw-r--r-- | src/librustc_driver/driver.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 5603ecb1c04..a04a5b106b8 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -741,15 +741,15 @@ pub fn phase_2_configure_and_expand<F>(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<F>(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 { |
