diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-01-18 07:40:55 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2019-01-19 05:01:29 +0100 |
| commit | beb0c74950ec51582b58e3f13e5b2a47b14f524d (patch) | |
| tree | 7024257787ed5afca55b626afdc80263e8ea07c8 /src/librustc_driver | |
| parent | f001287c90e98d72296eb2a20e3cbe34b977f587 (diff) | |
| download | rust-beb0c74950ec51582b58e3f13e5b2a47b14f524d.tar.gz rust-beb0c74950ec51582b58e3f13e5b2a47b14f524d.zip | |
Combine all builtin early lints and use a separate walk for plugin lints. Add a -Z no-interleave-lints option to allow benchmarking lints
Diffstat (limited to 'src/librustc_driver')
| -rw-r--r-- | src/librustc_driver/driver.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs index 1ecb8ef112c..495df73e5e9 100644 --- a/src/librustc_driver/driver.rs +++ b/src/librustc_driver/driver.rs @@ -898,7 +898,7 @@ where sess.track_errors(|| { let mut ls = sess.lint_store.borrow_mut(); for pass in early_lint_passes { - ls.register_early_pass(Some(sess), true, pass); + ls.register_early_pass(Some(sess), true, false, pass); } for pass in late_lint_passes { ls.register_late_pass(Some(sess), true, pass); @@ -919,7 +919,11 @@ where } time(sess, "pre ast expansion lint checks", || { - lint::check_ast_crate(sess, &krate, true) + lint::check_ast_crate( + sess, + &krate, + true, + rustc_lint::BuiltinCombinedPreExpansionLintPass::new()); }); let mut resolver = Resolver::new( @@ -1131,7 +1135,7 @@ where }); time(sess, "early lint checks", || { - lint::check_ast_crate(sess, &krate, false) + lint::check_ast_crate(sess, &krate, false, rustc_lint::BuiltinCombinedEarlyLintPass::new()) }); // Discard hygiene data, which isn't required after lowering to HIR. |
