Rollup merge of #5505 - flip1995:avoid_running_lints, r=matthiaskrgr

Avoid running cargo+internal lints when not enabled

r? @matthiaskrgr

changelog: none
This commit is contained in:
Philipp Krones
2020-04-25 21:06:27 +02:00
committed by GitHub
6 changed files with 66 additions and 27 deletions

View File

@@ -1024,9 +1024,9 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
store.register_early_pass(|| box precedence::Precedence);
store.register_early_pass(|| box needless_continue::NeedlessContinue);
store.register_early_pass(|| box redundant_static_lifetimes::RedundantStaticLifetimes);
store.register_early_pass(|| box cargo_common_metadata::CargoCommonMetadata);
store.register_early_pass(|| box multiple_crate_versions::MultipleCrateVersions);
store.register_early_pass(|| box wildcard_dependencies::WildcardDependencies);
store.register_late_pass(|| box cargo_common_metadata::CargoCommonMetadata);
store.register_late_pass(|| box multiple_crate_versions::MultipleCrateVersions);
store.register_late_pass(|| box wildcard_dependencies::WildcardDependencies);
store.register_early_pass(|| box literal_representation::LiteralDigitGrouping);
let literal_representation_threshold = conf.literal_representation_threshold;
store.register_early_pass(move || box literal_representation::DecimalLiteralRepresentation::new(literal_representation_threshold));